From bc1573ae8c74b910592a56da78d0f3a33bfff0af Mon Sep 17 00:00:00 2001 From: Radoslaw Koppel Date: Mon, 5 Feb 2024 10:59:22 +0100 Subject: [PATCH] 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 --- 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 a06e851e52ea..a5dd3eaf652d 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 a5af58fe6dee..463e389de9fb 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 a06e851e52ea..a5dd3eaf652d 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 9293fa531dba..6dfd3b4274b9 100644 --- a/include/zephyr/arch/arm64/scripts/linker.ld +++ b/include/zephyr/arch/arm64/scripts/linker.ld @@ -112,7 +112,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