avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Re: Removal of unused functions


From: Bernd Trog
Subject: Re: [avr-gcc-list] Re: Removal of unused functions
Date: Mon, 21 Aug 2006 13:34:00 -0700 (PDT)

Joerg wrote:

> I think avr-libc would at least have to add __attribute__((used)) to
> the interrupt vector declarators, wouldn't it?  Without that, IMHO the
> linker would assume the vectors to be dead code I'm afraid.

IMO, we should clearly distinguish between compile-time and link-time
optimizations:

compile-time: (gcc-4.1+)
Use __attribute__((used)) for ISRs if you call gcc with -combine 
-fwhole-program *.c.

link-time: (binutils ~2.10+)
Use KEEP(vectors) in the linker script if you call ld with --gc-sections.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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