Re: Shared library defines a RPATH
On Sun, Jul 28, 2002 at 08:19:03AM -0300, Henrique de Moraes Holschuh wrote:
> On Sun, 28 Jul 2002, Darren Salt wrote:
> > > Use a wrapper script that sets LD_LIBRARY_PATH?
> > This is good unless the binary in question needs to be setuid or setgid, e.g.
> Then add the path to ld.so.conf. There are no exceptions to the rpath rule
> for *libraries*.
ld.so.conf is a Linuxism, and not part of the ELF standard.
You can like it or not, rpath is the standard solution for a library not
being in /lib (and maybe also /usr/lib if you are into /usr). So, all
libraries in other places (like /usr/X11R6/lib) should get rpath.
Now, the criticism that this is not relocatable is valid, and that's why the
current version of the ELF standard is introducing runpath, which has the
same semantics has rpath but has a lower precedence then LD_LIBRARY_PATH.
This should make everyone happy. It is already supported by the GNU libc
runtime linker, but unfortunately binutils+gcc can not add the runpath to
the object files yet. :-/ I guess as soon as all GNU tools support it,
it will be used by libtool instead of rpath.
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org email@example.com
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com