http://timetobleed.com/dynamic-symbol-table-duel-elf-vs-mach-o-round-2/
1. symbol table 符号表
只是对debug有用。strip会去除符号表
The symbol table does
not need to be mapped into a running process and is only useful for debugging. The
symbol table (and other sections) may be removed from an object when you use
strip
.
2. dynamic symbol table 动态符号表
动态符号表是加载动态库时能导出的函数表,例如dlopen后,dlsym能查找到的函数
动态符号表是符号表的subset
shared objects in both Mach-O
and
ELF
have a symbol table listing only functions that are exporteed by the object.
The dynamic symbol table in ELF objects is stored in a section named
dynsym
. The indexes stored in the st_name
field (from the structure listed above) are indexes into the string table in a section named
dynstr
. dynstr
is a string table specifically for entries in the dynamic symbol table.