diff --git a/arch/arm/core/swi_tables.ld b/arch/arm/core/swi_tables.ld index c6ca94604dda95..a5dd3eaf652dd0 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 -INCLUDE zephyr/isr_tables_swi.ld +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +INCLUDE isr_tables_swi.ld #endif diff --git a/arch/arm/core/vector_table.ld b/arch/arm/core/vector_table.ld index 58210afdcbcad7..463e389de9fb74 100644 --- a/arch/arm/core/vector_table.ld +++ b/arch/arm/core/vector_table.ld @@ -51,8 +51,8 @@ _vector_start = .; KEEP(*(.exc_vector_table)) KEEP(*(".exc_vector_table.*")) -#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION -INCLUDE zephyr/isr_tables_vt.ld +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +INCLUDE isr_tables_vt.ld #else KEEP(*(.vectors)) #endif diff --git a/arch/arm64/core/swi_tables.ld b/arch/arm64/core/swi_tables.ld index c6ca94604dda95..a5dd3eaf652dd0 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 -INCLUDE zephyr/isr_tables_swi.ld +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) +INCLUDE 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..6dfd3b4274b9c7 100644 --- a/include/zephyr/arch/arm64/scripts/linker.ld +++ b/include/zephyr/arch/arm64/scripts/linker.ld @@ -111,8 +111,8 @@ SECTIONS KEEP(*(.exc_vector_table)) KEEP(*(".exc_vector_table.*")) -#if LINKER_ZEPHYR_FINAL && CONFIG_ISR_TABLES_LOCAL_DECLARATION - INCLUDE zephyr/isr_tables_vt.ld +#if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) + INCLUDE isr_tables_vt.ld #else KEEP(*(.vectors)) #endif