On Monday 13 May 2002 02:06 am, Terry Lambert wrote:
= > If you think that providing bits on the link line in dependency
= > order is a natural way of linking and the "proper" way of doing
= > it, how do you explain our improper use of putting object files in
= > lexical order in libraries and how do you resolve the contradiction
= > that from a build point of view the lexical order is the proper
= > way of building and we only get away with that because the
= > linker doesn't require object files in archive libraries to be
= > in dependency order (or we manually correct the situation by
= > duplication)?
= I explain the lexical ordering by way of the following commands when
= exiting the Makefile in "vi" in command mode:
= !!ls *.c
This does not explain anything. Whatever the joke was, I did not get it.
The question stands -- why can the object files be given to the linker
in arbitrary order, but the the static libraries must be carefully
ordered -- possibly even listed multiple times! There is nothing
apparent in the .a format, that forces such behaviour.
All of our Makefiles list objects in the alphabetical order -- why
not sort them once with lorder/tsort and skip the lorder/tsort step
from the library build (in bsd.lib.mk)? That would also speed up
= Linking fewer object files into an executable makes the executable
= smaller. Smaller executables are better than larger executables from a
= putatively "smarter" linker (personally, I measure linker intelligence
= as inversely proportional to the resulting executable size, relative
= to the idealized executable size).
Terry, NONE of this is relevant to the subject. Nobody is criticizing
our linker for not putting UNNEEDED objects into the executables. The
gaping hole in the linker, that is the subject of this thread, is the
linker's inability to find NEEDED objects, which are right in front of
= I had a big gripe, complete with examples involving famous names,
= ready to go. But I will replace it with a much smaller response:
= "A craftsman must know his tools".
And always seek to improve them.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message