This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Motivation for -rpath-link
- From: "Kai Ruottu" <karuottu at mbnet dot fi>
- To: binutils at sources dot redhat dot com
- Date: Wed, 5 Nov 2003 12:54:10 +0200
- Subject: Re: Motivation for -rpath-link
- Organization: MBinternet
- Reply-to: kai_ruottu at mbnet dot fi
Vladimir Prus <ghost@cs.msu.su> wrote:
> I'm somewhat confused about one sentence in -rpath-link documentaion. It says:
>
> When using ELF or SunOS, one shared library may require another.
> [....]
> When the linker encounters such a dependency when doing a non-shared,
> non-relocatable link, it will automatically try to locate the required
> shared library and include it in the link, if it is not included
> explicitly.
The '-rpath-link', needed or not needed, has been a problem lately and
still is... When linking on the native platform, it is not required, AFAIK, but when
linking on a cross platform where the shared libs are not in their runtime places,
it may still be required. With binutils-2.13 it was required always when cross-
linking, with the 2.13.90.0.x and 2.14.90.0.x Linux-binutils branches it isn't
required when linking the default libraries but is still required when linking the
alternative 'multilibs'.
For instance with the 'sparc-solaris2.7' target the libraries in the 'sparcv9' subdir
are not found although the '-m64' inserts those '-L' options into the linker command
line, ie. the linker doesn't use them in any way what becomes to the stuff seen as
'NEEDED' in an 'objdump -p' output... The libs listed explicitly on the link command
are of course found because of the used '-L' options, but not the libs told inside
the explicitly listed libraries.
So my question is: Is it a 'bug' or a 'feature' that those "NEEDED" libs for the
multilibs are not found automagically but a '-rpath-link' will still be required for
them?
Cheers, Kai