This is the mail archive of the mailing list for the GDB 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: GDB honouring RPATH in binaries.

On Thu, Feb 20, 2003 at 02:54:01PM -0500, Kris Warkentin wrote:
> > On Thu, Feb 20, 2003 at 02:44:52PM -0500, Kris Warkentin wrote:
> > > > Question: when do we need to find shared libraries that we can't use a
> > > > full path + solib-absolute-prefix, where RPATH would be in the least
> > > > useful?  RPATH only matters when you have multiple places you could
> > > > find the library and are interested in which one you got; if there is
> a
> > > > mapping between target and host filesystems, it should be
> > > > solib-absolute-prefix only.
> > > >
> > > > We generally get full pathnames of loaded modules from the dynamic
> > > > linker, and use that.  Is this a problem for QNX?
> > >
> > > In the remote case I suppose it is.  The linker on the remote will have
> > > loaded /lib/ or some such but on the host, that will be
> > > $QNX_TARGET/$CPU/lib/  Hence solib-absolute-prefix being set
> to
> > > $QNX_TARGET/$CPU.  I'm just looking for better ways to get this all to
> work
> > > together with a minimum of fuss for the end user.
> >
> > I guess I don't see the problem.  If we have solib-absolute-prefix set,
> > and we retrieve the string "/lib/" from the remote target...
> You're preaching to the choir. ;-)  I'm just trying to form an intelligent
> argument for those in my company who want to use RPATH.  In solib_open(), we
> search the inferior's LD_LIBRARY_PATH and PATH as a fallback so I wonder if
> there would be any harm in at least looking at the RPATH?  Perhaps if we
> just appended it to solib-search-path or one of the others?  I dunno.
> That's why I'm asking.

IMVHO, this is what should be happening in your setup:
 - search $solib-absolute-prefix/$full-path-from-target
 - search $solib-search-path for $basename-from-target

If you've uploaded it somewhere (/tmp) other than the normal location,
then it's your responsibility to make sure solib-search-path works.  I
don't see the point in honoring rpath.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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