From d8d34e033ce24493cda3785124663c7b102d2129 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 10 Sep 2020 13:15:54 +0200 Subject: [PATCH] cpu/cortexm_common: add XFA handling to linkerscript The global core/ldscripts/xfa.ld doesn't match our cortexm_base.ld. This commit directly adds the two XFA lines to cortexm_base.ld. In addition to that, a dummy (empty) xfa.ld is added, which the linker will pick instead of core/ldscripts/xfa.ld, effectingly not using it. --- cpu/cortexm_common/ldscripts/cortexm_base.ld | 2 ++ cpu/cortexm_common/ldscripts/xfa.ld | 1 + 2 files changed, 3 insertions(+) create mode 100644 cpu/cortexm_common/ldscripts/xfa.ld diff --git a/cpu/cortexm_common/ldscripts/cortexm_base.ld b/cpu/cortexm_common/ldscripts/cortexm_base.ld index de0dc81fd1..01360513e8 100644 --- a/cpu/cortexm_common/ldscripts/cortexm_base.ld +++ b/cpu/cortexm_common/ldscripts/cortexm_base.ld @@ -55,6 +55,7 @@ SECTIONS *(.text .text.* .gnu.linkonce.t.*) *(.glue_7t) *(.glue_7) *(.rodata .rodata* .gnu.linkonce.r.*) + KEEP (*(SORT(.roxfa.*))) *(.ARM.extab* .gnu.linkonce.armextab.*) /* Support C constructors, and C destructors in both user code @@ -167,6 +168,7 @@ SECTIONS _srelocate = .; *(.ramfunc .ramfunc.*); *(.data .data.*); + KEEP (*(SORT(.xfa.*))) KEEP (*(.openocd .openocd.*)) . = ALIGN(4); _erelocate = .; diff --git a/cpu/cortexm_common/ldscripts/xfa.ld b/cpu/cortexm_common/ldscripts/xfa.ld new file mode 100644 index 0000000000..76aa43de62 --- /dev/null +++ b/cpu/cortexm_common/ldscripts/xfa.ld @@ -0,0 +1 @@ +/* empty file overriding core/ldscripts/xda.ld */