From 79e0ab743ec6c00e6905f0ce73cdc6eee8bdc020 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 28 May 2021 06:50:39 -0500 Subject: [PATCH] soc: xtensa: linker: Update linker scripts for C++ build When we link in crtbegin.o for C++ exception support we end up pulling in the .tm_clone_table section. We need to update the linker scripts to handle this. soc/xtensa/sample_controller/linker.ld was already updated, this fixes the others. Signed-off-by: Kumar Gala --- soc/xtensa/intel_adsp/cavs_v15/linker.ld | 5 +++++ soc/xtensa/intel_adsp/cavs_v18/linker.ld | 5 +++++ soc/xtensa/intel_adsp/cavs_v20/linker.ld | 5 +++++ soc/xtensa/intel_adsp/cavs_v25/linker.ld | 5 +++++ soc/xtensa/intel_s1000/linker.ld | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/soc/xtensa/intel_adsp/cavs_v15/linker.ld b/soc/xtensa/intel_adsp/cavs_v15/linker.ld index 26ac34569f2..2cf7b64f69b 100644 --- a/soc/xtensa/intel_adsp/cavs_v15/linker.ld +++ b/soc/xtensa/intel_adsp/cavs_v15/linker.ld @@ -474,6 +474,11 @@ SECTIONS *(.cached .cached.*) } >ram :ram_phdr + .tm_clone_table SEGSTART_UNCACHED : + { + *(.tm_clone_table) + } >ram :ram_phdr + . = ALIGN(4096); .bss SEGSTART_UNCACHED (NOLOAD) : diff --git a/soc/xtensa/intel_adsp/cavs_v18/linker.ld b/soc/xtensa/intel_adsp/cavs_v18/linker.ld index fb664a01a46..964fcbfea19 100644 --- a/soc/xtensa/intel_adsp/cavs_v18/linker.ld +++ b/soc/xtensa/intel_adsp/cavs_v18/linker.ld @@ -479,6 +479,11 @@ SECTIONS *(.cached .cached.*) } >ram :ram_phdr + .tm_clone_table SEGSTART_UNCACHED : + { + *(.tm_clone_table) + } >ram :ram_phdr + . = ALIGN(4096); .bss SEGSTART_UNCACHED (NOLOAD) : diff --git a/soc/xtensa/intel_adsp/cavs_v20/linker.ld b/soc/xtensa/intel_adsp/cavs_v20/linker.ld index 7f5e8c42562..3958c9fb64a 100644 --- a/soc/xtensa/intel_adsp/cavs_v20/linker.ld +++ b/soc/xtensa/intel_adsp/cavs_v20/linker.ld @@ -446,6 +446,11 @@ SECTIONS } >ram :ram_phdr #include + .tm_clone_table : + { + *(.tm_clone_table) + } >ram :ram_phdr + .bss (NOLOAD) : ALIGN(4096) { . = ALIGN(4096); diff --git a/soc/xtensa/intel_adsp/cavs_v25/linker.ld b/soc/xtensa/intel_adsp/cavs_v25/linker.ld index 2931492b4a9..9e0a70f7b17 100644 --- a/soc/xtensa/intel_adsp/cavs_v25/linker.ld +++ b/soc/xtensa/intel_adsp/cavs_v25/linker.ld @@ -515,6 +515,11 @@ SECTIONS _loader_storage_manifest_end = ABSOLUTE(.); } >ram :ram_phdr + .tm_clone_table : + { + *(.tm_clone_table) + } >ram :ram_phdr + .bss (NOLOAD) : ALIGN(4096) { . = ALIGN(4096); diff --git a/soc/xtensa/intel_s1000/linker.ld b/soc/xtensa/intel_s1000/linker.ld index f68d98867c6..41e789123df 100644 --- a/soc/xtensa/intel_s1000/linker.ld +++ b/soc/xtensa/intel_s1000/linker.ld @@ -426,6 +426,11 @@ SECTIONS } >ram :ram_phdr #include + .tm_clone_table : + { + *(.tm_clone_table) + } >ram :ram_phdr + .bss (NOLOAD) : ALIGN(8) { . = ALIGN (8);