[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] ATmega256x trampolines? (Was: Why is there1200bytes o
From: |
Eric Weddington |
Subject: |
RE: [avr-gcc-list] ATmega256x trampolines? (Was: Why is there1200bytes of zeroes in my code?) |
Date: |
Wed, 21 Mar 2007 06:12:01 -0600 |
Hi Björn,
>From your description, it sounds like -Wl,--relax should be used all the
time. Is there ever a case where it should *not* be used? Can it be used for
all architectures (avr2, avr3,...)?
If it can be used all the time, then I can add it to the Makefile Template
that gets distributed with WinAVR/MFile.
Thanks
Eric Weddington
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Haase Bjoern (PT-BEU/EMT)
> Sent: Wednesday, March 21, 2007 3:05 AM
> To: Erik Christiansen; Joerg Wunsch
> Cc: address@hidden
> Subject: AW: [avr-gcc-list] ATmega256x trampolines? (Was: Why
> is there1200bytes of zeroes in my code?)
>
> Hi, you could solve your problem by using -Wl,--relax . The
> linker first starts with worst-case assumptions that imply
> that it needs a trampoline for any function.
>
> The linker thus reserves the space for all possibly needed
> trampolines and starts the application code behind the
> trampolines. If it turns out that not all of the trampolines
> are actually needed, this space remains reserved by default.
>
> The space is freed afterwards when using the linker relaxation.
>
> Yours,
>
> Björn.
>
>
> -----Ursprüngliche Nachricht-----
> Von:
> address@hidden
> [mailto:address@hidden
> org] Im Auftrag von Erik Christiansen
> Gesendet: Mittwoch, 21. März 2007 09:42
> An: Joerg Wunsch
> Cc: address@hidden
> Betreff: Re: [avr-gcc-list] ATmega256x trampolines? (Was: Why
> is there 1200bytes of zeroes in my code?)
>
> On Wed, Mar 21, 2007 at 07:07:24AM +0100, Joerg Wunsch wrote:
>
> >
> > > *fill* 0x000020f3 0x1 00=20
> > > 0x000020f4
> __trampolines_start =3D .=20
> > > *(.trampolines)=20
> > > .trampolines 0x000020f4 0x0 linker stubs=20
> > > *(.trampolines*)=20
> > > 0x000020f4
> __trampolines_end =3D .=20
> > > *(.jumptables)=20
> > > *(.jumptables*)=20
> >
> > Obviously, this is somehow related to the linker stubs, but the
> > question is how the space allocation is calculated.
>
> Is it possible to invoke avr-gcc with "-Wl,-verbose" in the winavr
> environment, so the we can see the linker script being used? (It would
> be enlightening to see what it directs for these sections.)
>
> Erik
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>