cortexm-m-generic: Make the linker script LTO-safe by making sure the vector table is always retained

This commit is contained in:
dragonmux
2024-01-14 05:54:42 +00:00
committed by Piotr Esden-Tempski
parent 547b7c0e72
commit 133a1ddfaf

View File

@@ -43,7 +43,7 @@ ENTRY(reset_handler)
SECTIONS SECTIONS
{ {
.text : { .text : {
*(.vectors) /* Vector table */ KEEP(*(.vectors)) /* Vector table */
*(.text*) /* Program code */ *(.text*) /* Program code */
. = ALIGN(4); . = ALIGN(4);
*(.rodata*) /* Read-only data */ *(.rodata*) /* Read-only data */
@@ -122,4 +122,3 @@ SECTIONS
} }
PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram)); PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram));