What exactly does "info sharedlibrary" command show?

Frederic RISS frederic.riss@st.com
Tue Aug 29 12:47:00 GMT 2006


On Tue, 2006-08-29 at 20:03 +0800, chen free wrote:
> Recently I'm looking for a proper method of finding the memory usage
> of shared library of a specific program, 

This is a tough job, I'm not sure looking at info sharedlibrary will
help you much. 

> and from the manual of GDB, I
> found "info sharedlibrary" command.
> 
> However, I'm curious about the display of its result. Does anyone know
> the meaning of memory address reported by GDB? Something like:
> ============
> 
> >From        To          Syms Read   Shared Object Library
> 0x005cfc00  0x006bf800  Yes         /lib/tls/libc.so.6
> 0x0059e7a0  0x005b010f  Yes         /lib/ld-linux.so.2
> 
> ============
> I believe they are not the physical address, right?

They are the start/end (virtual) addresses of the library .text section.

> ============
> Contents of "maps"
> 0x005bb000  0x006de000 r-xp    00000000 fd:00 3605643    /lib/tls/libc-2.3.4.so

If you take this as an example, you should find out that 0x005cfc00 -
0x005bb000 gives you the .text section load addr (check in the elf file
using objdump -h or readelf -s).

Fred.



More information about the Gdb mailing list