This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch,avr] PR21849: Locate section .progmemx.* at a higher address.
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: Binutils Development <binutils at sourceware dot org>
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Thu, 27 Jul 2017 12:57:51 +0200
- Subject: [patch,avr] PR21849: Locate section .progmemx.* at a higher address.
- Authentication-results: sourceware.org; auth=none
Hi, this fixes PR21849: The current location of data for
avr-gcc named address space __memx is such that it "wastes"
lower addresses in the 16-bit range.
As the compiler is using 24-bit addresses for __memx data which
it located in .progmemx.*, this section can be moved to a higher
address in the linker script.
If ok, please commit.
Would also be great if this can go into 2.29.
Johann
ld/
PR ld/21849
* scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate
former at a higher address.
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index 07553b4..7a146b7 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -128,7 +128,7 @@ SECTIONS
${RELOCATING+ *libprintf_flt.a:*(.progmem.data)}
${RELOCATING+ *libc.a:*(.progmem.data)}
- ${RELOCATING+ *(.progmem*)}
+ ${RELOCATING+ *(.progmem.*)}
${RELOCATING+. = ALIGN(2);}
@@ -196,6 +196,8 @@ SECTIONS
*(.hightext)
${RELOCATING+ *(.hightext*)}
+ ${RELOCATING+ *(.progmemx.*)}
+
${RELOCATING+. = ALIGN(2);}
/* For tablejump instruction arrays. We don't relax