avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] PROGMEM section variables throw away by --gc-sections


From: Dean
Subject: Re: [avr-libc-dev] PROGMEM section variables throw away by --gc-sections?
Date: Wed, 14 Nov 2007 21:59:00 +1100

--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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]