I seriously think I found and pinned down a bug in the avr32-gcc toolset relating it's initialization code.
The parameters of my environment:
avr32-gcc version 3.4.1-348
(avr32 header pack was extracted from ASF, copied at the avr32/include/av32 path, so accessible like #include
When one customizes a linker script creating specific sections in RAM which shall be initialized from C code by initializators, the byte streams required for the initialization are properly compiled and linked in the resulting image, but the initialization code fails to respect the initalizators of the specific sections.
I attached a test case demonstrating this behavior. It tries to specify stack canaries around the stack which are supposed to be initialized by normal C initializers.
Normally one would except that the LED will stay lit in the demonstration, but it will be observed that the LED flashes instead. If one removes the section specifier attribute from the stack_b array, and compiles the code, the LED will stay lit as excepted.
Well, at least I think this is a bug, maybe I am just using the linker script incorrectly. Could someone point this out for me if this is the case?