This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: readelf.c (dynamic segment)
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Filippos Papadopoulos <csst9923 at cs dot uoi dot gr>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 8 May 2003 20:14:00 -0400
- Subject: Re: readelf.c (dynamic segment)
- References: <Pine.GSO.4.44.0305090146020.5000-100000@io.cs.uoi.gr>
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