Bug 21849 - [avr] Locate .progmemx at a higher address.
Summary: [avr] Locate .progmemx at a higher address.
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.29
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 10:44 UTC by Georg-Johann Lay
Modified: 2017-07-27 13:24 UTC (History)
1 user (show)

See Also:
Host:
Target: avr
Build:
Last reconfirmed:


Attachments
proposed patch (279 bytes, patch)
2017-07-27 11:07 UTC, Georg-Johann Lay
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georg-Johann Lay 2017-07-27 10:44:48 UTC
avr-gcc puts data for named address space __memx into section .progmemx.  The current linker script has a catch-all .progmem* located at a lower address together with data that is expected to reside in the lower 64 KiB flash segment.

This is not required for __memx data so that .progmemx. can be moved to a higher address, wasting less of the small addresses.
Comment 1 Georg-Johann Lay 2017-07-27 11:07:53 UTC
Created attachment 10290 [details]
proposed patch

ld/
	PR ld/21849
	* scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate
	former at a higher address.
Comment 2 Sourceware Commits 2017-07-27 13:18:21 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f726cc1cb69ab0e0303209d08effb10b99007080

commit f726cc1cb69ab0e0303209d08effb10b99007080
Author: Georg-Johann Lay <gjl@gcc.gnu.org>
Date:   Thu Jul 27 14:17:14 2017 +0100

    Move AVR .promemx.* sections into higher memory.
    
    	PR ld/21849
    	* scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate
    	former at a higher address.
Comment 3 Sourceware Commits 2017-07-27 13:21:53 UTC
The binutils-2_29-branch branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e84dfccb213f1258dd29492653713d5b04a2431

commit 0e84dfccb213f1258dd29492653713d5b04a2431
Author: Georg-Johann Lay <gjl@gcc.gnu.org>
Date:   Thu Jul 27 14:20:50 2017 +0100

    Move AVR .progmemx.* sections to higher memory.
    
    	PR ld/21849
    	* scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate
    	former at a higher address.
Comment 4 Nick Clifton 2017-07-27 13:24:33 UTC
Patch approved and applied.