I\'ve been using objdump to look at assembly code in Linux ELF binaries.
Sometimes there is an indirect jump through a jump table that is stored in the
You can get the RAW (not hexdump-ed) ELF section with:
# To a file:
objcopy file /dev/null --dump-section .text=text.data
# To stdout:
objcopy file /dev/null --dump-section .text=/dev/stdout | cat
Here I'm using | cat in order to force stdout to be a pipe. /dev/stdout might work unexpectedly if stdout is a file. .text=- does not send to stdout but to the - file.
However objcopy and objdump have some deficiencies (because they are based on BFD which abstracts different executable formats).
Update: I wrote a tool to do this which does not rely on BFD.