Create a gist now

Instantly share code, notes, and snippets.

@andigena /layouts.txt Secret
Last active Jul 25, 2016

address space layouts with PIE binaries
old layout
Start Addr End Addr Size Offset objfile
0x7fdcb0e5e000 0x7fdcb0fb7000 0x159000 0x0 /lib/libc-2.11.3.so
0x7fdcb0fb7000 0x7fdcb11b6000 0x1ff000 0x159000 /lib/libc-2.11.3.so
0x7fdcb11b6000 0x7fdcb11ba000 0x4000 0x158000 /lib/libc-2.11.3.so
0x7fdcb11ba000 0x7fdcb11bb000 0x1000 0x15c000 /lib/libc-2.11.3.so
0x7fdcb11bb000 0x7fdcb11c0000 0x5000 0x0
0x7fdcb11c0000 0x7fdcb11de000 0x1e000 0x0 /lib/ld-2.11.3.so
0x7fdcb13c7000 0x7fdcb13ca000 0x3000 0x0
0x7fdcb13d5000 0x7fdcb13dd000 0x8000 0x0
0x7fdcb13dd000 0x7fdcb13de000 0x1000 0x1d000 /lib/ld-2.11.3.so
0x7fdcb13de000 0x7fdcb13df000 0x1000 0x1e000 /lib/ld-2.11.3.so
0x7fdcb13df000 0x7fdcb13e0000 0x1000 0x0
0x7fdcb13e0000 0x7fdcb13e1000 0x1000 0x0 /home/pista/a
0x7fdcb15e0000 0x7fdcb15e1000 0x1000 0x0 /home/pista/a
0x7fdcb2ba8000 0x7fdcb2bc9000 0x21000 0x0 [heap]
0x7fff50b06000 0x7fff50b1b000 0x15000 0x0 [stack]
0x7fff50be1000 0x7fff50be3000 0x2000 0x0 [vdso]
0xffffffffff600000 0xffffffffff601000 0x1000 0x0 [vsyscall]
new layout
0x55c3d548d000 0x55c3d548e000 r-xp 1000 0 /media/SSD2/dev/hx/ptmalloc/madness/mmap
0x55c3d568d000 0x55c3d568e000 r--p 1000 1ff000 /media/SSD2/dev/hx/ptmalloc/madness/mmap
0x55c3d568e000 0x55c3d568f000 rw-p 1000 0 /media/SSD2/dev/hx/ptmalloc/madness/mmap
0x7f76dd3da000 0x7f76dd59a000 r-xp 1c0000 29b307d4b000 /lib/x86_64-linux-gnu/libc-2.23.so
0x7f76dd59a000 0x7f76dd799000 ---p 1ff000 0 /lib/x86_64-linux-gnu/libc-2.23.so
0x7f76dd799000 0x7f76dd79d000 r--p 4000 0 /lib/x86_64-linux-gnu/libc-2.23.so
0x7f76dd79d000 0x7f76dd79f000 rw-p 2000 0 /lib/x86_64-linux-gnu/libc-2.23.so
0x7f76dd79f000 0x7f76dd7a3000 rw-p 4000 0
0x7f76dd7a3000 0x7f76dd7c9000 r-xp 26000 0 /lib/x86_64-linux-gnu/ld-2.23.so
0x7f76dd99f000 0x7f76dd9a2000 rw-p 3000 1d6000
0x7f76dd9c6000 0x7f76dd9c8000 rw-p 2000 24000
0x7f76dd9c8000 0x7f76dd9c9000 r--p 1000 0 /lib/x86_64-linux-gnu/ld-2.23.so
0x7f76dd9c9000 0x7f76dd9ca000 rw-p 1000 0 /lib/x86_64-linux-gnu/ld-2.23.so
0x7f76dd9ca000 0x7f76dd9cb000 rw-p 1000 0
0x7ffce8300000 0x7ffce8322000 rw-p 22000 860a935000 [stack]
0x7ffce83da000 0x7ffce83dc000 r--p 2000 b8000 [vvar]
0x7ffce83dc000 0x7ffce83de000 r-xp 2000 0 [vdso]
0xffffffffff600000 0xffffffffff601000 r-xp 1000 ffff800317222000 [vsyscall]
@andigena
Owner

the offset field in the new layout is actually the distance from the previous mapping obtained via some gdb hackery, not the file offset as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment