This is the mail archive of the 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.


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.


	PR ld/21583
	* scripttempl/ (.jumptables): Move down in text section.
	(.hightext): New in text.
diff --git a/ld/scripttempl/ b/ld/scripttempl/
index 1b74dc4..07553b4 100644
--- a/ld/scripttempl/
+++ b/ld/scripttempl/
@@ -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.  */
     ${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}

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