Use objdump -tT ${FILE}
ou readelf -s ${FILE}
.
$ objdump -T /lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libz.so.1: file format elf64-x86-64
DYNAMIC SYMBOL TABLE:
0000000000001c58 l d .init 0000000000000000 .init
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __snprintf_chk
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 free
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __errno_location
0000000000000000 w D *UND* 0000000000000000 _ITM_deregisterTMCloneTable
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 write
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strlen
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.4 __stack_chk_fail
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 snprintf
[...]
00000000000024c0 g DF .text 00000000000000f9 ZLIB_1.2.2 adler32_combine
0000000000002ba0 g DF .text 0000000000000005 ZLIB_1.2.3.3 crc32_combine64
0000000000010170 g DF .text 0000000000000074 Base gzdopen
0000000000000000 g DO *ABS* 0000000000000000 ZLIB_1.2.7.1 ZLIB_1.2.7.1
0000000000000000 g DO *ABS* 0000000000000000 ZLIB_1.2.3.3 ZLIB_1.2.3.3
000000000000c780 g DF .text 0000000000000036 Base inflateSyncPoint
00000000000104f0 g DF .text 0000000000000059 ZLIB_1.2.3.5 gzoffset64
0000000000011160 g DF .text 0000000000000005 ZLIB_1.2.5.2 gzgetc_
0000000000000000 g DO *ABS* 0000000000000000 ZLIB_1.2.3.4 ZLIB_1.2.3.4
0000000000000000 g DO *ABS* 0000000000000000 ZLIB_1.2.3.5 ZLIB_1.2.3.5
00000000000043a0 g DF .text 00000000000000cd ZLIB_1.2.5.2 deflateResetKeep
0000000000010550 g DF .text 0000000000000005 ZLIB_1.2.3.5 gzoffset
000000000000fdd0 g DF .text 0000000000000023 Base gzclose
[...]
Na saída de objdump
:
- Qualquer símbolo marcado com
*UND*
é residente em outra biblioteca ( dinamicamente vinculado )- por exemplo
free
,write
, etc ...
- por exemplo
- Qualquer símbolo com uma seção (por exemplo,
.init
ou.text
) reside nesta biblioteca- por exemplo
gzdopen
,gzclose
, etc ...
- por exemplo
Você pode usar ldd
para descobrir com quais bibliotecas um link binário (executável ou de biblioteca):
$ ldd /lib/x86_64-linux-gnu/libz.so.1
linux-vdso.so.1 => (0x00007ffc478f7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f92da469000)
/lib64/ld-linux-x86-64.so.2 (0x00007f92daa4d000)