This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Motivation for -rpath-link


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]