Steve Underwood wrote:
If I assemble the attached .S file with

msp430-gcc -g -O2 -mmcu=msp430x449 -D_GNU_ASSEMBLER_ -nostartfiles -nostandartlibs xxx.S

and dump the resulting file with:

msp430-objdump -DS a.out

please use -dS (i have -dst im my makefiles, altough i have to look at the map file option mentioned in an other thread too)

"D" forces objdump to disassemble data sections too. if you use "d" it wil only disassemble code and put a hexdump for data sections.

but there seems to be a problem with the RESET label too. as it does not appear in the output. "__ctors_end" is from the C++ compiler, i think, so it should not appear in a disassembly of assembler only code...

i had problems with msp430-objdump on win32 too, in the sense that it did not put c source everywhere. it just skipps some parts of a file and outputs asm only!? when i objdump the same elf on linux, it looks much better with more C code in the listing (not sure if its complete, did not check in detail, but its probably all correct)

chris

I get:

a.out:     file format elf32-msp430

Disassembly of section .text:

00001100 <__ctors_end>:
   1100:       33 40           .word   0x4033; ????
   1102:       00 0a           .word   0x0a00; ????
[...]
Why isn't the first instruction disassembled properly?



Reply via email to