Re: [arm-gnu] Link problem with new bare-metal EABI release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] Link problem with new bare-metal EABI release
- To: Freddie Chopin <freddie_chopin@xxxxx>
- Subject: Re: [arm-gnu] Link problem with new bare-metal EABI release
- From: Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
- Date: Fri, 05 Jun 2009 11:59:37 -0400
Freddie Chopin wrote:
So when I locate sections .bss and .stack with
} > ram AT > ram
it also works. But this is rather a hack, not a clean solution...
This is a good workaround.
We recently corrected a linker defect in the handling of VMA and LMA
offsets.
The following snippet of documentation explains what happens to those
sections *after* an AT> section, which don't themselves define AT>
http://sourceware.org/binutils/docs-2.19/ld/Output-Section-LMA.html#Output-Section-LMA
~~~
If neither AT nor AT> is specified for an allocatable section, the
linker will set the LMA such that the difference between VMA and LMA
for the section is the same as the preceding output section in the
same region. If there is no preceding output section or the section is
not allocatable, the linker will set the LMA equal to the VMA. See
Output Section Region.
~~~
So, you must use "> ram AT > ram" to get VMA == LMA for the subsequent
sections (or at least the next section).
Cheers,
Carlos.
--
Carlos O'Donell
CodeSourcery
carlos@xxxxxxxxxxxxxxxx
(650) 331-3385 x716