断点 1,0x00007ffff7de8060 在 _ _ libc _ start _ main () 来自/usr/lib/libc.so.6
(Gdb) r
正在调试的程序已经启动。
从头开始?(y 或 n) y
启动程序:/home/firstlove/projects/org-ioslide/example/a.out
断点 1,0x00007ffff7de8060 在 _ _ libc _ start _ main () 来自/usr/lib/libc.so.6
(Gdb) r
正在调试的程序已经启动。
从头开始?(y 或 n) y
启动程序:/home/firstlove/projects/org-ioslide/example/a.out
断点 1,0x00007ffff7de8060 在 _ _ libc _ start _ main () 来自/usr/lib/libc.so.6
(Gdb) 退出
(Gdb) 退出
调试会话处于活动状态。
劣质 1 [过程 16372] 将被杀死。
退出?(y 或 n) y
Firstlove-pc % cat/proc/sys/kernel/randomize_va_space
2
IIUC,ASLR 应该随机分配所有地址,包括libc.so
, but I found that the address of __libc_start_main()
is always 0x00007ffff7de8060
在我的 Linux 机器上,为什么?什么是错的?
When you run a program inside gdb, gdb tries to help you debugging by disabling address randomization. You can use the following command to enable it (effective from the next run of the program):
设置禁用随机化