dynamic symbol table

本文探讨了符号表和动态符号表的概念及其用途。符号表主要用于调试,可以通过strip命令移除;动态符号表则是在加载动态库时导出的函数表,用于dlopen和dlsym等操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

   


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值