Discussion:
deprecated status of RPATH
Jonathan Wakely
2012-05-04 11:38:27 UTC
Permalink
Hi,

the ld.so(8) man page says "Use of DT_RPATH is deprecated." which I
understand is because the ELF spec declares it obsolete, replaced by
DT_RUNPATH. Is it safe to assume (even if toolchains switch to
outputting DT_RUNPATH by default, which I've been informed SUSE and
Gentoo already do) that for the foreseeable future ld.so will continue
to honour RPATH tags in executables without RUNPATH tags?

Like many others, I'm still creating binaries with RPATH and no
RUNPATH today and I'll probably continue doing so for some time. The
"Use of DT_RPATH is deprecated" statement in the man page was brought
up and I'd like to be able to confidently say that a new ld.so won't
suddenly stop using the RPATH in existing executables.

Thanks,

Jonathan
Paul Pluzhnikov
2012-05-04 14:39:47 UTC
Permalink
Post by Jonathan Wakely
"Use of DT_RPATH is deprecated" statement in the man page was brought
up and I'd like to be able to confidently say that a new ld.so won't
suddenly stop using the RPATH in existing executables.
If ld.so was to suddenly stop honoring RPATH, a *lot* of existing
binaries would stop working, violating the "basic contract" of UNIX
binary compatibility -- existing dynamically linked binaries built on
older systems continue to run on newer systems -- which is the only
binary compatibility UNIX generally promises.

In my opinion, this is exceedingly unlikely to ever happen.
--
Paul Pluzhnikov
Jonathan Wakely
2012-05-04 17:27:23 UTC
Permalink
Post by Paul Pluzhnikov
Post by Jonathan Wakely
"Use of DT_RPATH is deprecated" statement in the man page was brought
up and I'd like to be able to confidently say that a new ld.so won't
suddenly stop using the RPATH in existing executables.
If ld.so was to suddenly stop honoring RPATH, a *lot* of existing
binaries would stop working, violating the "basic contract" of UNIX
binary compatibility -- existing dynamically linked binaries built on
older systems continue to run on newer systems -- which is the only
binary compatibility UNIX generally promises.
In my opinion, this is exceedingly unlikely to ever happen.
Yep, that's what I assumed.

Thanks for the reply.

Mike Frysinger
2012-05-04 16:50:22 UTC
Permalink
Post by Jonathan Wakely
the ld.so(8) man page says "Use of DT_RPATH is deprecated." which I
understand is because the ELF spec declares it obsolete, replaced by
DT_RUNPATH. Is it safe to assume (even if toolchains switch to
outputting DT_RUNPATH by default, which I've been informed SUSE and
Gentoo already do) that for the foreseeable future ld.so will continue
to honour RPATH tags in executables without RUNPATH tags?
i can't see glibc's ldso ever dropping support for DT_RPATH
-mike
Loading...