How about using objdump ?
$ cat add.c int add(int a, int b) { return a + b; } $ arm-linux-gnueabihf-gcc -c -O2 add.c $ arm-linux-gnueabihf-objdump -d add.o add.o: file format elf32-littlearm Disassembly of section .text: 00000000 <add>: 0: 1840 adds r0, r0, r1 2: 4770 bx lr
It can also provide mixing of the source code if your object file contains debugging information (gcc -g) and if you supply -S to objdump.
auselen
source share