[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem Installing Orca/C 1.3 - Unresolved Reference Label
In article <1993Feb12.084258.29554@ee.rochester.edu> seah@ee.rochester.edu (David Seah) writes:
>In article <1993Feb11.215254.4704@actrix.gen.nz> David.Empson@bbs.actrix.gen.nz writes:
>>To avoid having to reboot, use the RENAME command to move the affected
>>files out of the library directory, then move them back in, in the
>>correct order.
>
>There is also a built-in command SWITCH which will switch the entries
>in the directory around.
>
>Related question: Is there really any good reason for Orca/C to depend
>on the order of files in a directory structure? It seems kind of lame,
>but maybe, just maybe, there's a really excellent reason for it.
>
>--
>Dave Seah (seah@ee.rochester.edu, AFCDaveS@aol.com)
>That's Rochester, New York!
Yes, and no. No; the compiler doesn't care about the libraries -- it simply
passes its symbol table (in the =.ROOT & =.A[B,C,...] files) to the linker.
Yes, the linker does care about the order. The linker takes two passes
through the object files, reading the libraries during one. Since it is faster
to search in memory, the linker doesn't make extra passes through the
libraries on disk, since they might be on a 3.5". If it did, the order
wouldn't matter. Because it doesn't though, the libraries have to be in the
correct order so that inter-library references can be resolved. The problem
could also be solved with another pass through the object files, but this
is a bad tradeoff.
Hope this answers your query.
wsquires@lonestar.utsa.edu
"Cowboys: Superbowl XXVII champs!"