svn commit: r208545 - in head/release: amd64 i386 ia64 pc98
powerpc sparc64 sun4v
Tim Kientzle
kientzle at freebsd.org
Thu May 27 05:44:38 UTC 2010
Kostik Belousov wrote:
>> On 2010/05/26 11:47, Garrett Cooper wrote:
>>> On Wed, May 26, 2010 at 11:28 AM, Rob Farmer <rfarmer at 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
More information about the svn-src-head
mailing list