From cbceff7b28461003fcad6778a803f5950aadb3cd Mon Sep 17 00:00:00 2001 From: Radoslaw Koppel Date: Mon, 5 Feb 2024 10:28:06 +0100 Subject: [PATCH] arch: arm, arm64: Disable swi_tables.ld file when not required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes the need of swi_tables.ld file if the ISR table generator is not configured to use it. Signed-off-by: Radosław Koppel --- arch/arm/core/swi_tables.ld | 2 +- arch/arm/core/vector_table.ld | 2 +- arch/arm64/core/swi_tables.ld | 2 +- include/zephyr/arch/arm64/scripts/linker.ld | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/core/swi_tables.ld b/arch/arm/core/swi_tables.ld index c6ca94604dda95..a06e851e52eadb 100644 --- a/arch/arm/core/swi_tables.ld +++ b/arch/arm/core/swi_tables.ld @@ -3,6 +3,6 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#if LINKER_ZEPHYR_FINAL +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) INCLUDE zephyr/isr_tables_swi.ld #endif diff --git a/arch/arm/core/vector_table.ld b/arch/arm/core/vector_table.ld index 58210afdcbcad7..a5af58fe6deebd 100644 --- a/arch/arm/core/vector_table.ld +++ b/arch/arm/core/vector_table.ld @@ -51,7 +51,7 @@ _vector_start = .; KEEP(*(.exc_vector_table)) KEEP(*(".exc_vector_table.*")) -#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) INCLUDE zephyr/isr_tables_vt.ld #else KEEP(*(.vectors)) diff --git a/arch/arm64/core/swi_tables.ld b/arch/arm64/core/swi_tables.ld index c6ca94604dda95..a06e851e52eadb 100644 --- a/arch/arm64/core/swi_tables.ld +++ b/arch/arm64/core/swi_tables.ld @@ -3,6 +3,6 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#if LINKER_ZEPHYR_FINAL +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) INCLUDE zephyr/isr_tables_swi.ld #endif diff --git a/include/zephyr/arch/arm64/scripts/linker.ld b/include/zephyr/arch/arm64/scripts/linker.ld index 55c768f55e4927..9293fa531dbaee 100644 --- a/include/zephyr/arch/arm64/scripts/linker.ld +++ b/include/zephyr/arch/arm64/scripts/linker.ld @@ -111,7 +111,7 @@ SECTIONS KEEP(*(.exc_vector_table)) KEEP(*(".exc_vector_table.*")) -#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) INCLUDE zephyr/isr_tables_vt.ld #else KEEP(*(.vectors))