From 566c4663439c726ec3eb22ca8f985d6cc552f9e8 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Fri, 12 Nov 2021 09:59:50 -0800 Subject: [PATCH] soc: intel_adsp/cavs_v20: correct linker syntax for old binutils Applying similar changes to cavs_v20 as in commit 8bc4539cec63fd747c923e79d1aa60221e4961ce: Older binutils, like the (nine-year-old!) 2.23 version that powers many Cadence XCC toolchains, happen not to support the "~" operator to perform bitwise negation. And they generate an absolutely hilarious series of inscrutable error messages when they try to tell you this fairly simple fact. Just fold it into the constant. Signed-off-by: Daniel Leung --- soc/xtensa/intel_adsp/cavs_v20/linker.ld | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soc/xtensa/intel_adsp/cavs_v20/linker.ld b/soc/xtensa/intel_adsp/cavs_v20/linker.ld index f9d7f6128eb..6371b88ae8a 100644 --- a/soc/xtensa/intel_adsp/cavs_v20/linker.ld +++ b/soc/xtensa/intel_adsp/cavs_v20/linker.ld @@ -42,9 +42,10 @@ PROVIDE(_MemErrorHandler = 0x00000000); * the output tooling ignores it, but it will cause the linker to emit * 512MB of unused data into the output file!) * + * (Note clumsy syntax because XCC doesn't understand the "~" operator) */ #define SEGSTART_CACHED (ALIGN(64) | 0x20000000) -#define SEGSTART_UNCACHED (ALIGN(64) & ~0x20000000) +#define SEGSTART_UNCACHED (ALIGN(64) & 0xdfffffff) /* == ~0x20000000 */ MEMORY {