Patch: Re: bug in ld -rpath ??

H . J . Lu hjl@lucon.org
Tue Aug 22 08:38:00 GMT 2000


On Tue, Aug 22, 2000 at 05:27:55PM +0200, Mark Kettenis wrote:
> 
>    2. I think -rpath should be used for native linker only. My patch
>    doesn't address that. I can provide a separate patch after we finish
>    this one
> 
> I think I agree, although it is a bit fuzzy what exactly a "native
> linker" is.  A "native" Linux binutils actually does work fine as a

For the DT_NEEDED handling, to me, a "native linker" uses the same
directories for DT_NEEDED as the runtime linker.

> cross-binutils for other ELF/x86 targets.  The only difference between
> a "native" linker and a "cross" linker is the default search path (at
> least before your path).

The native linker uses LD_LIBRARY_PATH for DT_NEEDED. You really
don't want to search -rpath for DT_NEEDED with cross linker for the
same reason as DT_RUNPATH and LD_LIBRARY_PATH.


H.J.


More information about the Binutils mailing list