[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: |
Weddington, Eric |
Subject: |
RE: [avr-libc-dev] PROGMEM section variables throw away by--gc-sections? |
Date: |
Tue, 13 Nov 2007 19:23:35 -0700 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Dean
> Sent: Tuesday, November 13, 2007 5:59 PM
> To: address@hidden
> Subject: [avr-libc-dev] PROGMEM section variables throw away
> by--gc-sections?
>
> Hi guys,
>
> I've been noticing some strange behaviour with my makefile arguments.
>
> Firstly, LD.exe crashes when I use -mshort-calls with the
> --relax linker option, but *only* if I *don't* use
> -ffunction-sections and --gc-sections. With the latter two
> options enabled both -mshort-calls and --relax work just fine.
IIRC, this was discussed somewhat on Freaks, although you seem to have
found a new twist on the matter. ;-) Can you open up a binutils bug
report? Let me know what the bug number is.
> Secondly, -ffunction-sections and --gc-sections seems to
> throw away some of my PROGMEM variables. I rely on a few
> PROGMEM variables being embedded into the binary so I can
> later distinguish which version it was compiled from, similar to:
>
> char PROGMEM buildtime[] = __TIME__;
>
> --gc-sections seems to remove this, although I thought it was
> only designed to remove unused functions and not PROGMEM
> data. Is there a workaround to this?
>
Can you post a minimal test case? What versions of the tools are you
using?
Thanks,
Eric Weddington