Relative DT_RPATH/DT_RUNPATH vs. sysroot capable ld.
Hans-Peter Nilsson
hp@bitrange.com
Thu Sep 24 18:04:00 GMT 2015
On Thu, 24 Sep 2015, Alan Modra wrote:
> This fixes two problems. First, the --sysroot option wasn't available
> with a ld configured without --with-sysroot, a historical accident.
> This led to people configuring binutils with --with-sysroot=/ in order
> to enable sysroot support, which exposes a case where ld wrongly
> prepends the sysroot to a relative path.
>
> PR ld/18992
> * ldmain.c (main): Always enable --sysroot.
> * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't
> prepend sysroot to relative rpath/runpath.
I though this would break some case in
testsuite/ld-scripts/sysroot-prefix.exp but apparently not.
(I re-checked with --with-sysroot=/tmp/somewherenotfound
toolchains.)
Still, it could do with some adjustment: parts of the table can
be folded now that there's no "non-sysroot" (it's now the same
as sysroot == "/" IIUC).
brgds, H-P
More information about the Binutils
mailing list