This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gnu ld searchpath


On 28 May 2015 13:25, Ramana Radhakrishnan wrote:
> > Is this the expected behavior for gnu ld ? And ld.so.conf file entries
> > only affect runtime linker (ld-linux*.so) searchpaths ?
> 
> ld.so.conf has nothing to do with the static linker. It's only used by
> the dynamic linker.

sorry, but that's incorrect.  he is referring to the documentation:
https://sourceware.org/binutils/docs/ld/Options.html
(scan down to the -rpath-link section)

that does cover ld.so.conf, and ld itself does parse it in some cases:
ld/emultempl/elf32.em:
/* For a native linker, check the file /etc/ld.so.conf for directories
   in which we may find shared libraries.  /etc/ld.so.conf is really
   only meaningful on Linux.  */

in many C libraries, /etc/ld.so.conf isn't used by the dynamic linker.  instead 
tools like ldconfig (that you mentioned) parse those paths to generate a cache 
file that the dynamic linker then uses.  i'm sure you knew that, but i figured 
while we're all being pedantic ... ;)
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]