This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch, avr] Set data section's LMA to AT> text instead of end of .text
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: nick clifton <nickc at redhat dot com>
- Cc: <binutils at sourceware dot org>, <chertykov at gmail dot com>
- Date: Tue, 19 Nov 2013 11:49:53 +0530
- Subject: Re: [Patch, avr] Set data section's LMA to AT> text instead of end of .text
- Authentication-results: sourceware.org; auth=none
- References: <20131118124055 dot GC4043 at atmel dot com> <528A35DA dot 1070901 at redhat dot com>
On Mon, Nov 18, 2013 at 03:44:26PM +0000, nick clifton wrote:
> Hi Senthil,
>
> > This patch sets the LMA for the .data section to the next available
> > address in the text region (AT> text), rather than ADDR(.text) + SIZE(.text).
> > This prevents address overlap errors from the linker if there are
> > other sections (unknown to the default linker script) that go into the text region.
>
> [You mean SIZEOF(.text) not SIZE(.text)...]
>
> This does not sound correct. SIZEOF (.text) should return the size of the
> entire .text section, including any input sections that have been assigned
> there by the linker even though they were not mentioned in the linker
> script. If you have a situation where the linker is not evaluating SIZEOF
> correctly then please report it - it is a bug.
It does work if the input section is assigned to the .text output
section - it doesn't if gets assigned to the text MEMORY region.
Regards
Senthil