This is the mail archive of the
mailing list for the binutils project.
Re: [Patch, avr] Fix PR 13697 without KEEPing .data
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Nick Clifton <nickc at redhat dot com>, Georg Johann Lay <avr at gjlay dot de>
- Date: Tue, 8 Jul 2014 20:23:14 +0400
- Subject: Re: [Patch, avr] Fix PR 13697 without KEEPing .data
- Authentication-results: sourceware.org; auth=none
- References: <20140702115557 dot GA20760 at atmel dot com> <CADOs=zbVOwg-hTxGrHzqQti8Vut=xsQzOJpGGMogbKofQsYo4w at mail dot gmail dot com> <20140708104543 dot GA13961 at atmel dot com>
2014-07-08 14:45 GMT+04:00 Senthil Kumar Selvaraj
> On Thu, Jul 03, 2014 at 07:46:13PM +0400, Denis Chertykov wrote:
>> 2014-07-02 15:55 GMT+04:00 Senthil Kumar Selvaraj
>> > The fix for PR 13697
>> > (https://sourceware.org/bugzilla/show_bug.cgi?id=13697) added a
>> > KEEP(*(.data)) to prevent the .bss section from getting an incorrect
>> > VMA.
>> > The patch fixes the problem, but it also prevents the linker
>> > from gc'ing .data sections. It also only keeps sections named
>> > .data, so -fdata-sections could potentially cause the fix to break
>> > (it works right now because the assembler generates an empty .data section).
>> > The following patch fixes the problem by explicitly setting the
>> > .bss section's VMA to the end of .data's VMA. It kinda looks redundant,
>> > as both .data and .bss are assigned to the same region, but is needed because
>> > the region's ORIGIN is hardcoded whereas the start of .data/.bss varies
>> > by device (and is passed along as -Tdata=<address> by the compiler
>> > driver).
>> > Does this look ok? I verified that the testcase mentioned in the
>> > bug report works fine.
>> > If ok, could someone commit please? I don't have commit access.
>> > Regards
>> > Senthil
>> > ld/ChangeLog
>> > 2014-07-02 Senthil Kumar Selvaraj <firstname.lastname@example.org>
>> > * scripttempl/avr.sc: Remove KEEP for .data and
>> > force .bss VMA to end of .data VMA.
> The changes don't show up in the master branch.
> does not show it either?
Just forgot to type "git push".
It's ok now.