From efdefefc2bc5b9255576301cb06adfa38f04ebb1 Mon Sep 17 00:00:00 2001 From: Radoslaw Koppel Date: Mon, 5 Feb 2024 10:59:22 +0100 Subject: [PATCH] [nrf fromtree] arch: arm, arm64: Remove zephyr prefix from linker includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fix removes the zephyr/ prefix from linker included files. With this prefix the build works only for Ninja and not for other build tools. Linking in Zephyr / CMake: - Ninja invokes linking directly from . - Make invokes linking form /zephyr. The linker default uses cwd for looking up INCLUDE directives if not found in list of includes. Zephyr always adds /zephyr as link include using CMake, and this is passed to ld as -L/zephyr therefore using INCLUDE isr_tables_swi.ld ensures it will be correctly found in all cases. Signed-off-by: Radosław Koppel (cherry picked from commit 08070fbf1f4ca15956a7aef104a131ec5924462c) --- 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 a06e851e52e..a5dd3eaf652 100644 --- a/arch/arm/core/swi_tables.ld +++ b/arch/arm/core/swi_tables.ld @@ -4,5 +4,5 @@ * SPDX-License-Identifier: Apache-2.0 */ #if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) -INCLUDE zephyr/isr_tables_swi.ld +INCLUDE isr_tables_swi.ld #endif diff --git a/arch/arm/core/vector_table.ld b/arch/arm/core/vector_table.ld index a5af58fe6de..463e389de9f 100644 --- a/arch/arm/core/vector_table.ld +++ b/arch/arm/core/vector_table.ld @@ -52,7 +52,7 @@ KEEP(*(.exc_vector_table)) KEEP(*(".exc_vector_table.*")) #if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) -INCLUDE zephyr/isr_tables_vt.ld +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 a06e851e52e..a5dd3eaf652 100644 --- a/arch/arm64/core/swi_tables.ld +++ b/arch/arm64/core/swi_tables.ld @@ -4,5 +4,5 @@ * SPDX-License-Identifier: Apache-2.0 */ #if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) -INCLUDE zephyr/isr_tables_swi.ld +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 18f973e7968..ad7832f16ec 100644 --- a/include/zephyr/arch/arm64/scripts/linker.ld +++ b/include/zephyr/arch/arm64/scripts/linker.ld @@ -106,7 +106,7 @@ SECTIONS KEEP(*(".exc_vector_table.*")) #if LINKER_ZEPHYR_FINAL && defined(CONFIG_ISR_TABLES_LOCAL_DECLARATION) - INCLUDE zephyr/isr_tables_vt.ld + INCLUDE isr_tables_vt.ld #else KEEP(*(.vectors)) #endif