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)