--gc_sections removes all sections, that the linker thinks are unused. Did you compile also with the -fdata-sections compiler switch?

The assembler symbol of buildtime is not modified by -ffunction-sections, only by -fdata-sections.

I can also imagine a missing KEEP instruction in the linker script

Rolf


Tested with -ffunction-sections and -fdata-sections, neither make any difference. Funny thing is, not all my PROGMEM data is being thrown away, only two unreferenced ones. I suppose the linker's technically justified in removing them, but is there a way to indicate that I want *all* PROGMEM variables preserved, no matter what? Adding the used attribute didn't help, either.


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to