Do you ever wonder how a Linux process address space looks like when the first user mode instruction is executed? The answer is below ( the executable file is /bin/grep )
00400000-0042d000 r-xp 00000000 08:11 27316285 /bin/grep
0062d000-0062f000 rw-p 0002d000 08:11 27316285 /bin/grep
0062f000-00630000 rw-p 00000000 00:00 0 [heap]
7ffff7dda000-7ffff7dfd000 r-xp 00000000 08:11 11172260 /lib/x86_64-linux-gnu/ld-2.19.so
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]
7ffff7ffc000-7ffff7ffe000 rw-p 00022000 08:11 11172260 /lib/x86_64-linux-gnu/ld-2.19.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
The first user mode instruction is
0x00007ffff7ddb2d0 in _start () from /lib64/ld-linux-x86-64.so.2
00400000-0042d000 r-xp 00000000 08:11 27316285 /bin/grep
0062d000-0062f000 rw-p 0002d000 08:11 27316285 /bin/grep
0062f000-00630000 rw-p 00000000 00:00 0 [heap]
7ffff7dda000-7ffff7dfd000 r-xp 00000000 08:11 11172260 /lib/x86_64-linux-gnu/ld-2.19.so
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]
7ffff7ffc000-7ffff7ffe000 rw-p 00022000 08:11 11172260 /lib/x86_64-linux-gnu/ld-2.19.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
The first user mode instruction is
0x00007ffff7ddb2d0 in _start () from /lib64/ld-linux-x86-64.so.2
No comments:
Post a Comment