Date: Wed, 26 May 2010 22:44:35 -0700 From: Tim Kientzle <kientzle@freebsd.org> To: Kostik Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, Garrett Cooper <yanefbsd@gmail.com>, svn-src-all@freebsd.org, Rob Farmer <rfarmer@predatorlabs.net>, src-committers@freebsd.org Subject: Re: svn commit: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v Message-ID: <4BFE06C3.6040704@freebsd.org> In-Reply-To: <20100526191502.GG83316@deviant.kiev.zoral.com.ua> References: <201005251748.o4PHmI5T093246@svn.freebsd.org> <AANLkTilcASoInnpr5OL5usR7exerst2lTq7Wi_ypD_Tw@mail.gmail.com> <AANLkTimC39JXRyAAQnXI5qjHnIhLwczCPn22r8XmnhBu@mail.gmail.com> <4BFD6F80.8030700@delphij.net> <20100526191502.GG83316@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Kostik Belousov wrote: >> On 2010/05/26 11:47, Garrett Cooper wrote: >>> On Wed, May 26, 2010 at 11:28 AM, Rob Farmer <rfarmer@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BFE06C3.6040704>