This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Motivation for -rpath-link
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: binutils at sources dot redhat dot com
- Date: Tue, 4 Nov 2003 13:02:18 +0300
- Subject: Motivation for -rpath-link
Hello,
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.
Why this behaviour is desired? For example, I have exe "main" which links to
shared library "b", which links to shared library "a". Why it is necessary to
include "a" in link to "main". It is just in case "main" uses symbols from
"a", or there's some deeper motivation?
Thanks in advance,
Volodya