小编La *_*lle的帖子

如何找到共享库的符号的绝对地址?

我想写一个小函数的跟踪器.我用ptrace.

当我看到CALL指令时,我想显示相当于地址调用的函数名称.

我的跟踪器使用带有绝对地址的符号(符号在主二进制文件中定义).但我不知道如何在虚拟内存中获取共享库函数的绝对地址.例如,检测对libc函数的调用.

我注意到共享库中函数的地址是相对于文件的.

以下等式是否良好?

Absolute address of symbol = address of the shared library in virtual memory +
                             relative address of the symbol.
Run Code Online (Sandbox Code Playgroud)

如何从共享库中获取符号的绝对地址?

c symbols shared-libraries elf

5
推荐指数
1
解决办法
1957
查看次数

标签 统计

c ×1

elf ×1

shared-libraries ×1

symbols ×1