We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binary/libc: Archive.zip OS: Manjaro patchelf: 0.18.0
Gdb can't find any symbols anymore after running pwninit:
$ pwninit --bin rpsls --libc libc.so.6 --no-template bin: rpsls libc: libc.so.6 ld: ./ld-2.31.so unstripping libc https://launchpad.net/ubuntu/+archive/primary/+files//libc6-dbg_2.31-0ubuntu9.2_amd64.deb eu-unstrip: cannot find matching section for [16] '.text' eu-unstrip: cannot find matching section for [17] '__libc_freeres_fn' eu-unstrip: cannot find matching section for [18] '.rodata' eu-unstrip: cannot find matching section for [19] '.stapsdt.base' eu-unstrip: cannot find matching section for [20] '.interp' eu-unstrip: cannot find matching section for [21] '.eh_frame_hdr' eu-unstrip: cannot find matching section for [22] '.eh_frame' eu-unstrip: cannot find matching section for [23] '.gcc_except_table' eu-unstrip: cannot find matching section for [24] '.tdata' eu-unstrip: cannot find matching section for [25] '.tbss' eu-unstrip: cannot find matching section for [26] '.init_array' eu-unstrip: cannot find matching section for [27] '.data.rel.ro' eu-unstrip: cannot find matching section for [28] '.dynamic' eu-unstrip: cannot find matching section for [29] '.got' eu-unstrip: cannot find matching section for [30] '.got.plt' eu-unstrip: cannot find matching section for [31] '.data' eu-unstrip: cannot find matching section for [32] '__libc_subfreeres' eu-unstrip: cannot find matching section for [33] '__libc_IO_vtables' eu-unstrip: cannot find matching section for [34] '__libc_atexit' eu-unstrip: cannot find matching section for [35] '.bss' eu-unstrip: cannot find matching section for [36] '__libc_freeres_ptrs' warning: failed unstripping libc: eu-unstrip exited with failure: exit status: 1 copying rpsls to rpsls_patched running patchelf on rpsls_patched $ ldd rpsls_patched linux-vdso.so.1 (0x00007ffff7fc8000) libc.so.6 => ./libc.so.6 (0x00007ffff7dc9000) ./ld-2.31.so => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fca000) $ gdb rpsls_patched GNU gdb (GDB) 13.1 ... gef➤ b main Function "main" not defined.
Same behavior when manually running patchelf with both args:
$ cp rpsls rpsls_patched $ patchelf --set-interpreter ./ld-2.31.so --set-rpath . rpsls_patched $ gdb rpsls_patched GNU gdb (GDB) 13.1 ... gef➤ b main Function "main" not defined.
Only with 2 separate commands it works as expected:
$ cp rpsls rpsls_patched $ patchelf --set-interpreter ./ld-2.31.so rpsls_patched $ patchelf --set-rpath . rpsls_patched $ ldd rpsls_patched linux-vdso.so.1 (0x00007ffff7fc8000) libc.so.6 => ./libc.so.6 (0x00007ffff7dc9000) ./ld-2.31.so => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ffff7fca000) $ gdb GNU gdb (GDB) 13.1 ... gef➤ b main Breakpoint 1 at 0x153a
The text was updated successfully, but these errors were encountered:
fix(patchelf): run once per option to avoid broken offsets/symbols
2c4c9e0
Fixes io12#297
I've been hit by this issue as well and opened #299 to fix this.
Sorry, something went wrong.
fix(patchelf): run once per option to avoid broken offsets/symbols (#299
ca34d07
) Fixes #297
patchelf --set-interpreter
patchelf --set-rpath
Successfully merging a pull request may close this issue.
binary/libc: Archive.zip
OS: Manjaro
patchelf: 0.18.0
Gdb can't find any symbols anymore after running pwninit:
Same behavior when manually running patchelf with both args:
Only with 2 separate commands it works as expected:
The text was updated successfully, but these errors were encountered: