I'm attempting to do an object dump of an assembled program for the pi. I have main.o main.s main.elf and main.bin
otool -tV main.o
This results in
main.o: is not an object file
What am I doing wrong?
I'm attempting to do an object dump of an assembled program for the pi. I have main.o main.s main.elf and main.bin
otool -tV main.o
This results in
main.o: is not an object file
What am I doing wrong?
Since you are using a cross binutils, try
arm-xxx-xxx-objdump -D --target binary -marm
With the actual name of your appopriate cross objdump.
You may also need to play with -mthumb depending on what instruction set you have targeted - during execution arm and thumb mode can be distinguished, but it's not always possible to tell when just looking at binaries without heuristics or simulation.
Often thumb code is preferred for the internals of a program, but arm code often shows up in interface stubs, still that depends on the build flags that were used (or in your case, instructions manually written).
It's possible there's a comparable way to get the iphone version of otool to parse an arm binary for the pi, at least to an extent.