This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] Resend: Add a new chapter on the dynamic linker


Also: the documentation of RPATH and RUNPATH seems to be missing what I 
think of as the key difference: a RUNPATH is only used to locate objects 
listed as NEEDED in the same executable or shared library that has the 
RUNPATH, whereas the RPATH of the executable (and those of intermediate 
shared libraries) gets used to search for indirect shared library 
dependencies.

(This is also why I'm dubious of deprecation of RPATH.  If you want to use 
libraries from a non-default sysroot, you can link an executable with 
-Wl,-dynamic-linker,/sysroot/path-to-ld.so 
-Wl,-rpath,/sysroot/lib:/sysroot/usr/lib (or similar), and all required 
libraries, whether direct or indirect dependencies, will be loaded from 
the sysroot if present there.  This only works with RPATH semantics, not 
RUNPATH semantics.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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