Files and Shared Libraries163
5.8Files and Shared Libraries
You can find out information about the currently loaded file, its type, ELF segments, memory
addresses and other things. The following command displays such information about the
sum
program.
(gdb) info files
Symbols from "/home/rr/5/sum".
Unix child process:
Using the running image of child process 1860.
While running this, GDB does not access memory from...
Local exec file:
`/home/rr/5/sum', file type elf32-i386.
Entry point: 0x8048390
0x080480f4 - 0x08048107 is .interp
0x08048108 - 0x08048128 is .note.ABI-tag
0x08048128 - 0x08048160 is .hash
0x08048160 - 0x080481f0 is .dynsym
0x080481f0 - 0x0804828b is .dynstr
0x0804828c - 0x0804829e is .gnu.version
0x080482a0 - 0x080482d0 is .gnu.version_r
0x080482d0 - 0x080482d8 is .rel.got
0x080482d8 - 0x08048308 is .rel.plt
0x08048308 - 0x08048320 is .init
0x08048320 - 0x08048390 is .plt
0x08048390 - 0x08048540 is .text
0x08048540 - 0x0804855e is .fini
0x08048560 - 0x080485aa is .rodata
0x080495ac - 0x080495bc is .data
0x080495bc - 0x080495c0 is .eh_frame
0x080495c0 - 0x080495c8 is .ctors
0x080495c8 - 0x080495d0 is .dtors
0x080495d0 - 0x080495f8 is .got
0x080495f8 - 0x08049698 is .dynamic
0x08049698 - 0x080496b0 is .bss
You can also display information about shared libraries used by the
sum
program using
the following command:
(gdb) info share
From To Syms Read Shared Object Library
0x40047fa0 0x40140a9b Yes /lib/i686/libc.so.6
0x40001db0 0x4001321c Yes /lib/ld-linux.so.2
(gdb)
The command shows that the program is using
libc.so.6
and
ld-linux.so.2
dur-
ing the debug session. The
ld-linux.so
is the dynamic loader, and will always be present in
dynamically linked files.
Next Page >>
<< Previous Page
Back to the Table of Contents