This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Resend: Add a new chapter on the dynamic linker
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Ben Woodard <woodard at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, <codonell at redhat dot com>, <fwiemer at redhat dot com>, <ricaljasan at pacific dot net>
- Date: Fri, 13 Oct 2017 00:29:08 +0000
- Subject: Re: [PATCH] Resend: Add a new chapter on the dynamic linker
- Authentication-results: sourceware.org; auth=none
- References: <20171012215658.8524-1-woodard@redhat.com>
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