Kostik Belousov wrote:
On 2010/05/26 11:47, Garrett Cooper wrote:
On Wed, May 26, 2010 at 11:28 AM, Rob Farmer <rfar...@predatorlabs.net> wrote:
Does the order of the libs entries matter? ...

    In theory it shouldn't because the linker should be smart enough
to evaluate the dependencies and link everything properly, but our
copy of binutils isn't intelligent enough to determine the appropriate
order from what I've seen.

Comments about "linker not being smart enough" are nonsense.

In fact, library link ordering is quite
critical in some places, since it allows you to
override functions provided by later libraries.

Many people use this to override the system
malloc() (for debugging or code size purposes)
by simply linking against another library before
libc.  I've also used this trick to override
getpwnam() so as to avoid the 1/2 megabyte of
libc networking code that gets pulled in by
the standard implementation.

Tim
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to