This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question about finding depending libs
- From: Daniel Jacobowitz <drow at false dot org>
- To: Raimar Falke <mM3{3S0JV5YQkbx-4JOVT at rf dot risimo dot net>
- Cc: binutils at sourceware dot org
- Date: Thu, 17 Jan 2008 11:07:37 -0500
- Subject: Re: Question about finding depending libs
- References: <20080115163153.GA6767@stone.informatik.uni-bremen.de>
On Tue, Jan 15, 2008 at 05:31:53PM +0100, Raimar Falke wrote:
>
> Hello
>
> I have a question regarding the behaviour of RPATH/RUNPATH. Suppose
> you have an application which needs a lib (libbar) and this lib needs
> another lib (libfoo). Suppose further that the application contains an
> RPATH/RUNPATH entry and the "middle" lib doesn't. See also the
> attached tar file.
>
> Now the question is will the RPATH/RUNPATH of the application be used
> for finding libfoo?
I believe RPATH will be, RUNPATH won't be.
> GNU ld version 2.16.91.0.5 20051219 (SUSE Linux) on 32bit and GNU ld
> version 2.17.50.0.5 20060927 (SUSE Linux) on 64bit produces both
> RPATH and RUNPATH entry.
>
> Am I correct that this difference was caused by passing
> "--enable-new-dtags" to ld at configure time?
Maybe. Ask HJ about the details of those binutils versions.
> It looks to me that if only RPATH is set this RPATH is used to search
> also for "indirect" libs (like libfoo in the example). Is this the
> case? Is this documented somewhere?
RPATH is ignored if RUNPATH is set.
In the ELF gABI, which you can find on sco.com somewhere.
--
Daniel Jacobowitz
CodeSourcery