[pushed] AVR: Allow to place code directly after the interrupt vector table.

Message ID f5ec109b-f819-400c-9d8a-b156e1aa222a@gjlay.de
State New
Headers
Series [pushed] AVR: Allow to place code directly after the interrupt vector table. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Georg-Johann Lay Oct. 2, 2026, 6:38 p.m. UTC
  This patch adds a new input section pattern *(SORT(.vectortext*))
directly after the interrupt vector table.

Applied to the trunk.

Johann

--
	PR ld/34686
ld/
	* scripttempl/avr.sc (.text): Add *(SORT(.vectortext*))
	right after .vectors.

         so that no lower 64k .progmem addresses are wasted.  */
  

Patch

diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index b3cf421a78b..0eaadf270a3 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -191,6 +191,9 @@  test -z "${RELOCATING}" || cat <<EOF
      *(.vectors)
      KEEP(*(.vectors))

+    /* For code that should immediately follow the interrupt vector 
table.  */
+    *(SORT(.vectortext*))
+
      /* For data that needs to reside in the lower 64k of progmem.
         For data accessed with ELPM use .progmemx.* instead