From c817b2661f9c1df354a591634933223ca354132b Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Wed, 22 Jun 2022 12:30:06 +0200 Subject: [PATCH] test: arm_irq_vector_table: Fix when !CONFIG_GEN_IRQ_VECTOR_TABLE This test is based on the wrong assumption that the IRQ vector table symbols are always placed by the linker script also when CONFIG_GEN_IRQ_VECTOR_TABLE is not actually set. This is of course broken with the reworked mechanism of the IRQ vector table placement. Fix the test by reintroducing the old behaviour by forcefully reinstating the symbols in the linker script. Signed-off-by: Carlo Caione --- tests/arch/arm/arm_irq_vector_table/CMakeLists.txt | 2 ++ tests/arch/arm/arm_irq_vector_table/irq-vector-table.ld | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 tests/arch/arm/arm_irq_vector_table/irq-vector-table.ld diff --git a/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt b/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt index 0526bf8f873..fbec7488467 100644 --- a/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt +++ b/tests/arch/arm/arm_irq_vector_table/CMakeLists.txt @@ -7,3 +7,5 @@ project(arm_irq_vector_table) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) + +zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors irq-vector-table.ld) diff --git a/tests/arch/arm/arm_irq_vector_table/irq-vector-table.ld b/tests/arch/arm/arm_irq_vector_table/irq-vector-table.ld new file mode 100644 index 00000000000..66a08d8f569 --- /dev/null +++ b/tests/arch/arm/arm_irq_vector_table/irq-vector-table.ld @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: Apache-2.0 */ + +KEEP(*(_IRQ_VECTOR_TABLE_SECTION_SYMS))