From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6873 invoked by alias); 20 Feb 2003 19:58:40 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6865 invoked from network); 20 Feb 2003 19:58:40 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 20 Feb 2003 19:58:40 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1KJwdN11647 for ; Thu, 20 Feb 2003 14:58:39 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KJwdf02141; Thu, 20 Feb 2003 14:58:39 -0500 Received: from localhost.localdomain (vpn50-1.rdu.redhat.com [172.16.50.1]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KJwct20615; Thu, 20 Feb 2003 14:58:39 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1KJwXm10784; Thu, 20 Feb 2003 12:58:33 -0700 Date: Thu, 20 Feb 2003 19:58:00 -0000 From: Kevin Buettner Message-Id: <1030220195833.ZM10783@localhost.localdomain> In-Reply-To: "Kris Warkentin" "Re: GDB honouring RPATH in binaries." (Feb 20, 2:54pm) References: <0db801c2d914$78f80a50$0202040a@catdog> <1030220193301.ZM10611@localhost.localdomain> <20030220194049.GA19653@nevyn.them.org> <001301c2d918$894ef1d0$0202040a@catdog> <20030220194852.GA20424@nevyn.them.org> <002701c2d919$d07edce0$0202040a@catdog> To: "Kris Warkentin" , "Daniel Jacobowitz" Subject: Re: GDB honouring RPATH in binaries. Cc: "Kevin Buettner" , MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00438.txt.bz2 On Feb 20, 2:54pm, 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/libc.so.2 or some such but on the host, that will be > > > $QNX_TARGET/$CPU/lib/libc.so.2. 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/libc.so.2" 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. For remote targets, you must have solib-absolute-prefix set. Searching host libraries (whether found via RPATH or some other means) is almost invariably wrong. Kevin