1
votes

I am trying to use objdump to display source as well as disassembly using the -S option. I am running objdump on cygwin. I built objdump for ARM on cygwin. Compiler for build was gcc.

The elf file was built for ARM processor using Thumb2 instruction set using TI ARM compiler.

I am able to run objdump to just extract the disassembly(using -d option). However, I am getting a Segmentation fault when I try to use it to display source as well. It crashes as soon as it reaches the .text section. The output of using objdump -Mforce-thumb -S prog.out is:

prog.out: file format elf32-littlearm

Disassembly of section .text:

000000c0 <add_function>:
Segmentation fault (core dumped)

1

1 Answers

0
votes

Objdump is not a decompiler, but a disassembler. Disassembly is (comparatively) simple, provided the binary is not using anti-disassembly tricks. Decompilation, by contrast, is a very difficult thing to do, and objdump makes no attempt to do it. It can only dump source if the binary included it. That's not exactly common for native binaries, but from what I heard, Java binaries tend to include source.