This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch,ld,avr] PR21583: Move .jumptables to 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: Wed, 14 Jun 2017 12:20:55 +0200
- Subject: [patch,ld,avr] PR21583: Move .jumptables to a higher address.
- Authentication-results: sourceware.org; auth=none
Hi,
this moves .jumptables (currently unused section) to a higher
address so that it won't waste small flash locations in a planned
GCC addition.
It also adds .hightext, counterpart of .lowtext.
If ok for master please commit.
Johann
ld/
PR ld/21583
* scripttempl/avr.sc (.jumptables): Move down in text section.
(.hightext): New in text.
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index 1b74dc4..07553b4 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -132,11 +132,6 @@ SECTIONS
${RELOCATING+. = ALIGN(2);}
- /* For future tablejump instruction arrays for 3 byte pc devices.
- We don't relax jump/call instructions within these sections. */
- *(.jumptables)
- ${RELOCATING+ *(.jumptables*)}
-
/* For code that needs to reside in the lower 128k progmem. */
*(.lowtext)
${RELOCATING+ *(.lowtext*)}
@@ -196,6 +191,18 @@ SECTIONS
KEEP (*(.fini1))
*(.fini0) /* Infinite loop after program termination. */
KEEP (*(.fini0))
+
+ /* For code that needs not to reside in the lower progmem. */
+ *(.hightext)
+ ${RELOCATING+ *(.hightext*)}
+
+ ${RELOCATING+. = ALIGN(2);}
+
+ /* For tablejump instruction arrays. We don't relax
+ JMP / CALL instructions within these sections. */
+ *(.jumptables)
+ ${RELOCATING+ *(.jumptables*)}
+
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > text}
EOF