From 94a010107a03185f3620d76bb73daff8891f2e07 Mon Sep 17 00:00:00 2001 From: Torsten Rasmussen Date: Tue, 1 Jun 2021 10:04:31 +0200 Subject: [PATCH] arch: linker: specify intList section in the IDT_LIST region This commit specifies the intList section in the IDT_LIST region in the arch/common CMakeLists.txt file. It uses zephyr_linker_section to setup the intList section for first pass linker file and configures the section to hold irq_info and intList input section. For second pass linker file, the irq_info and intList input sections are placed in the /DISCARD/ section. Signed-off-by: Torsten Rasmussen --- arch/common/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/common/CMakeLists.txt b/arch/common/CMakeLists.txt index b39cc404ac0..ca0062a317f 100644 --- a/arch/common/CMakeLists.txt +++ b/arch/common/CMakeLists.txt @@ -24,6 +24,15 @@ zephyr_linker_sources_ifdef(CONFIG_GEN_ISR_TABLES ${ZEPHYR_BASE}/include/linker/intlist.ld ) +if(CONFIG_GEN_ISR_TABLES) + zephyr_linker_section(NAME .intList VMA IDT_LIST LMA IDT_LIST NOINPUT PASS 1) + zephyr_linker_section_configure(SECTION .intList KEEP INPUT ".irq_info" FIRST) + zephyr_linker_section_configure(SECTION .intList KEEP INPUT ".intList") + + zephyr_linker_section_configure(SECTION /DISCARD/ KEEP INPUT ".irq_info" PASS 2) + zephyr_linker_section_configure(SECTION /DISCARD/ KEEP INPUT ".intList" PASS 2) +endif() + zephyr_linker_sources_ifdef(CONFIG_ARCH_HAS_RAMFUNC_SUPPORT RAM_SECTIONS ramfunc.ld