From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25297 invoked by alias); 19 Jun 2003 12:24:25 -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 25266 invoked from network); 19 Jun 2003 12:24:25 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 19 Jun 2003 12:24:25 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id IAA17179; Thu, 19 Jun 2003 08:17:35 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id IAA29673; Thu, 19 Jun 2003 08:24:23 -0400 Message-ID: <046901c3365d$c68e2a50$0202040a@catdog> From: "Kris Warkentin" To: "Michael Snyder" , "Daniel Jacobowitz" Cc: "Kevin Buettner" , "Gdb@Sources.Redhat.Com" References: <09e801c33504$bd88b420$0202040a@catdog> <1030617200144.ZM31327@localhost.localdomain> <0ab001c3350d$359af2e0$0202040a@catdog> <1030617202406.ZM31423@localhost.localdomain> <3EEFAEDB.4090509@redhat.com> <005101c3353c$80077c70$2a00a8c0@dash> <1030618051511.ZM11645@localhost.localdomain> <3EF0B23E.8040406@redhat.com> <20030618191600.GB9449@nevyn.them.org> <3EF0C77A.5000007@redhat.com> <20030618202726.GA11078@nevyn.them.org> <3EF0D0AD.6000204@redhat.com> Subject: Re: Why does solib_open do what it does? Date: Thu, 19 Jun 2003 12:24:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-06/txt/msg00403.txt.bz2 > > In Linux it's the case for all searched-for objects, as far as I know - > > anything found via search paths, LD_LIBRARY_PATH, DT_RUNPATH, DT_RPATH, > > etc. will either be an absolute path or else contain slashes and be > > relative to the current directory. If it's not true for dlopen'd > > objects, well, there's no way to know where the app had chdir'd to when > > it loaded them. > > > > Do you know offhand when it's not true for GNU/Linux? > > No, I just recall that, several years ago when I worked on this code, > it was not always true. Okay gentlemen, all kidding aside, what do we do? At the bare minimum I believe the test /* If not found, next search the inferior's $PATH environment variable. */ if (found_file < 0 && solib_search_path != NULL) should be just: if (found_file < 0). We can always make a decision about removing the PATH and LD_LIBRARY_PATH checks later. cheers, Kris