diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/binary/objdump.md | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/binary/objdump.md b/src/binary/objdump.md index a76a327..6f17cb5 100644 --- a/src/binary/objdump.md +++ b/src/binary/objdump.md @@ -2,13 +2,15 @@ ```markdown objdump [opts] <elf> - -M intel use intil syntax - -d disassemble text section - -D disassemble all sections - -S mix disassembly with source code - -C demangle - -j <section> display info for section - --[no-]show-raw-insn [dont] show object code next to disassembly + -M intel use intil syntax + -d disassemble text section + -D disassemble all sections + --disassemble=<sym> disassemble symbol <sym> + -S mix disassembly with source code + -C demangle + -j <section> display info for section + --[no-]show-raw-insn [dont] show object code next to disassembly + --visualize-jumps[=color] visualize jumps with ascii art, optionally color arrows ``` ## Disassemble section @@ -54,3 +56,14 @@ objcopy -O binary --only-section .text test test-bin # Disassemble raw binary. objdump -D -b binary -m i386:x86-64 test-bin ``` + +## Example: disassemble specific symbol +```bash +# Disassemble main(). +objdump --disassemble=main <bin> +# Disassemble 'foo::bar()' (mangled). +objdump --disassemble=_ZN3foo3barEvr <bin> + +# Disassemble 'foo::bar()' (demangled), requires -C +objdump -C --disassemble=foo::bar <bin> +``` |