Dump Dynamic Symbol Table of A Shared Library

#63 · closed · 0 comments

View on GitHub ↗

chen3feng

# Dump Dynamic Symbol Table of A Shared Library ## `nm -D` ```console $ nm -D libfoo.so U write@GLIBC_2.2.5 U writev@GLIBC_2.2.5 000000000024ca90 T _ZN10AudioFrame7SetDataEPKhm 000000000024ce10 T _ZN10AudioFrameaSERKS1_ ``` ## `readelf -s` ```console $ readelf -Ws libfoo.so ... 320: 0000000000000000 0 FUNC GLOBAL DEFAULT UND wctob@GLIBC_2.2.5 (2) 321: 0000000000000000 0 FUNC GLOBAL DEFAULT UND btowc@GLIBC_2.2.5 (2) 322: 0000000000000000 0 FUNC GLOBAL DEFAULT UND gettext@GLIBC_2.2.5 (2) 324: 0000000000242070 13 FUNC GLOBAL DEFAULT 15 _ZN6Buffer7SetDataEPKhm ... ``` ## `objdump -T` ```console $ objdump -T libfoo.so ... 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.2.5) wctob 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.2.5) btowc 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.2.5) gettext 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.3.2) __register_atfork 0000000000242070 g DF .text 000000000000000d Base _ZN6Buffer7SetDataEPKhm ... ``` All the commands support `-C` option to demangle C++ names.

Comments