This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: readelf.c (dynamic segment)


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


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