Sergey A. Borshch schrieb:
Chris Liechti wrote:
Chris Liechti schrieb:
Chris Liechti schrieb:
Sergey, thank you for your efforts. most things look well, however there is one issue.
 >
i don't know yet where the problem is, the listing files have a lot of differences (addresses, because of init code)
currently it looks like that local static variables w/o init are not set to zero as they should.
i've duplicated the bss init section so that it is together with the .data copy loop. that's evil and needs cleanup. but at least fixed that the issue temporarily (as long as there initialized globals ;-) and the application now works fine.

i suspect conflicts with ASM_OUTPUT_BSS, BSS_SECTION_ASM_OP and/or others in gccs msp430.h.

Ok. I'll test it more precisely. Actually I've tested it in C++ mode only.

i may have a clean solution now.

uninitialized variables are reserved in assembler using .comm. the linker(?) then puts these in the .bss section but gcc does not know that so it did not output the reference to _do_clear_bss. i've now added the reference to the function also for variables that are put into .comm

the original code from you also works if -fno-common is used. in that case is gcc directly emitting these variables to .bss, where the reference to the function was correctly placed.

anyways, doing the same for .bss and .comm seems reasonable to me.

chris

Reply via email to