From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7547 invoked by alias); 9 May 2003 00:14:17 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 7529 invoked from network); 9 May 2003 00:14:16 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 9 May 2003 00:14:16 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19DvWt-0002l0-00; Thu, 08 May 2003 19:14:27 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19DvWS-0006ef-00; Thu, 08 May 2003 20:14:00 -0400 Date: Fri, 09 May 2003 00:14:00 -0000 From: Daniel Jacobowitz To: Filippos Papadopoulos Cc: binutils@sources.redhat.com Subject: Re: readelf.c (dynamic segment) Message-ID: <20030509001400.GA25565@nevyn.them.org> Mail-Followup-To: Filippos Papadopoulos , binutils@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00282.txt.bz2 On Fri, May 09, 2003 at 02:10:10AM +0300, Filippos Papadopoulos wrote: > > Hi. > Looking in readelf.c source i found that the function > 'process_dynamic_segment' provides me the names of the shared libraries > that are 'NEEDED'. As i have understood 'readelf' can provide only the name of the > 'NEEDED' libraries, not their full path. So to find the full path i use > the list of directories and libraries stored in the current > dynamic linker cache. I use '/sbin/ldconfig -p' for that. > The problem is that not all libraries are listed in the cache. For > example i found that the library 'konqueror.so' , on KDE 3, is not listed. > But i think that 'konqueror.so' has stored its full path in the rpath > field. My question is how to obtain the rpath of a library's name without > knowing where it resides? I found that by running 'readelf -d > /opt/kde3/bin/konqueror' the output lists an rpath entry(/opt/kde3/lib/). > But how can i tell that this rpath "belongs" to 'konqueror.so' and not to > any other listed 'NEEDED' library ? > As i am a bit newbie to ELF structures, and as the code of readelf.c is > tricky, i don't know where that info is in the readelf's source. It doesn't "belong" to any particular library - it just serves as a search path for all DT_NEEDED entries. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer