ld and rpath in .so

Carlos O'Donell carlos@redhat.com
Fri Jan 25 17:11:00 GMT 2019


On 1/25/19 9:02 AM, Andrew Bell wrote:
> It turns out that a recent change to ld added the sysroot to rpath entries
> when searching for libraries:
> 
> https://sourceware.org/ml/binutils/2017-03/msg00134.html
> 
> So, rpaths are searched, but not with the path as one might expect.
> 
> How do I check the cross linker's --with-sysroot option?
>>
> 
> Use the --print-sysroot option.

Exactly. This is what I would have expected, because a cross-toolchain is
rooted in a sysroot, and should search those paths by default to avoid
potentially ABI incompatible libraries for the same architecture.

-- 
Cheers,
Carlos.



More information about the Binutils mailing list