1

你们能告诉我如何在linux上获取当前进程的起始虚拟地址吗?任何有帮助的系统调用或设施?任何指导将不胜感激。

4

2 回答 2

1

检查如何objdump获取该地址。然后/proc/self/exe在您自己的代码中运行它。

% objdump -f /proc/self/exe             

/proc/self/exe:     file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000402f80
于 2011-05-11T10:29:26.253 回答
1

'grep' lsof 的输出怎么样?

lsof | grep <insert name of the program here>
于 2011-05-16T10:45:13.940 回答