From fd5fa203b6543670b13d42f7b16f89e4e44bf035 Mon Sep 17 00:00:00 2001 From: Eugeniy Paltsev Date: Fri, 22 Jan 2021 13:33:59 +0300 Subject: [PATCH] linker: common-rom: tweak section naming to feet all linkers MWDT toolchain adds additional suffix to sections name in case of ffunction-sections / fdata-sections are enabled. The 40d3653758cd commit (device: add post-process of elf file to manage device handles) breaks linkage with MWDT toolchain as it adds new sections which are not meet MWDT requirements. Let's pick a single set of rules and syntax that work for all toolchain. Signed-off-by: Eugeniy Paltsev --- include/linker/common-rom.ld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linker/common-rom.ld b/include/linker/common-rom.ld index 5767d8c6c8f..c8860e50fa1 100644 --- a/include/linker/common-rom.ld +++ b/include/linker/common-rom.ld @@ -41,9 +41,9 @@ { __device_handles_start = .; #ifdef LINKER_PASS2 - KEEP(*(SORT(.__device_handles_pass2))); + KEEP(*(SORT(.__device_handles_pass2*))); #else /* LINKER_PASS2 */ - KEEP(*(SORT(.__device_handles_pass1))); + KEEP(*(SORT(.__device_handles_pass1*))); #endif /* LINKER_PASS2 */ __device_handles_end = .; } GROUP_LINK_IN(ROMABLE_REGION)