From cca5b61e8462d9ae14f74df2775f3535f44cd797 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 14 Dec 2018 15:28:14 -0600 Subject: [PATCH] arc: cleanup linker scripts to include autoconf.h first The various linker scripts on arc would include autoconf.h in the arch linker script but might have CONFIG_ symbols referenced in the soc specific linker script. Move autoconf.h inclusion to top of the soc specific linker script out of the arch specific one so we know autoconf.h is seen before any CONFIG_ references. Signed-off-by: Kumar Gala --- include/arch/arc/v2/linker.ld | 1 - soc/arc/quark_se_c1000_ss/linker.ld | 4 +++- soc/arc/snps_emsk/linker.ld | 1 + soc/arc/snps_nsim/linker.ld | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/arch/arc/v2/linker.ld b/include/arch/arc/v2/linker.ld index c354eaf88a3..7c11c36b16d 100644 --- a/include/arch/arc/v2/linker.ld +++ b/include/arch/arc/v2/linker.ld @@ -11,7 +11,6 @@ #define _LINKER #define _ASMLANGUAGE -#include #include #if defined(CONFIG_UART_NSIM) diff --git a/soc/arc/quark_se_c1000_ss/linker.ld b/soc/arc/quark_se_c1000_ss/linker.ld index 72464e6ecd2..ef5392ba1f0 100644 --- a/soc/arc/quark_se_c1000_ss/linker.ld +++ b/soc/arc/quark_se_c1000_ss/linker.ld @@ -4,6 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include +#include + /** * @brief Linker script for the Quark SE platform, both standard images and XIP * images. @@ -26,5 +29,4 @@ #define DCCM_START DT_DCCM_BASE_ADDRESS #define DCCM_SIZE DT_DCCM_SIZE -#include #include diff --git a/soc/arc/snps_emsk/linker.ld b/soc/arc/snps_emsk/linker.ld index f1b53fed0b8..296c41d9bcf 100644 --- a/soc/arc/snps_emsk/linker.ld +++ b/soc/arc/snps_emsk/linker.ld @@ -9,6 +9,7 @@ */ #include +#include /* * DRAM base address and size diff --git a/soc/arc/snps_nsim/linker.ld b/soc/arc/snps_nsim/linker.ld index ec7c1300178..947b816e00d 100644 --- a/soc/arc/snps_nsim/linker.ld +++ b/soc/arc/snps_nsim/linker.ld @@ -9,7 +9,7 @@ */ #include - +#include /* Instruction Closely Coupled Memory (ICCM) base address and size */ #if defined(DT_ICCM_BASE_ADDRESS) && (DT_ICCM_SIZE > 0)