This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch,ld,avr] PR21583: Move .jumptables to a higher address.


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]