Difference between disassembled elf file and disassembly during debugging

HeikoAverbeck
Posts: 3
Joined: Mon Jun 29, 2020 11:43 am

Difference between disassembled elf file and disassembly during debugging

Postby HeikoAverbeck » Mon Jun 29, 2020 7:20 pm

I have observed a difference between the disassembled elf file and the disassembly during debugging.
Left is the elf file and right is the debug output. The address 400d3276 is missing in the elf file.
2020-06-29 20_42_49-New Text Compare_ - Text Compare - Beyond Compare.png
2020-06-29 20_42_49-New Text Compare_ - Text Compare - Beyond Compare.png (43.89 KiB) Viewed 71 times
My source code calls the gpio function for pin 27, this 27 is shown at the mentioned address.
No I was wondering why this line is missing in the elf file. And I was even more surprised that this movi.n instruction on the address 400d3276 has the same opcode like the ceil.s on address 400d3275. Then I have checked the Instruction set and I have seen that the ceil.s instruction is 24 bit long and the movi.n instruction just 16 bit. Ok this make sense.
But why is objdump not able to recognize this? Is it just a bug in objdump? Or do I have to tell objdump that the code density option is used?

Thanks in advance!

Who is online

Users browsing this forum: No registered users and 23 guests