tech_log: Examining your ARM asm of a compiled elf of u-boot

Monday, March 23, 2009

Examining your ARM asm of a compiled elf of u-boot

Note: u-boot.bin is in bin format, not in elf. For arm-linux-objdump dissassembly use the other image, u-boot (no extension) :
arm-linux-objdump -DSt u-boot > u-boot.dis<br /><br />
If you see the code "mixed up", i.e. some instructions that come later in C code now perceed or come in between of some instructions in asm, that might be because optimization is switched on for gcc, and it tries to find best possible arrangement of asm instructions.

For better inspection and in order that asm instructions come in the same order as the ones in the C counterpart program, find -Os optimization options in CFLAGS, and switch it off (delete it).

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home