From 98dd53b99442ae15d78125b4453b1adc926e9ff3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 18 Dec 2021 12:08:53 -0500 Subject: [PATCH] memmap: Fix gcc out-of-bounds warning Use a different definition for the linker script symbol to avoid a gcc warning. Signed-off-by: Kevin O'Connor --- src/memmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memmap.h b/src/memmap.h index 22bd4bcb..32ca2653 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -15,7 +15,7 @@ static inline void *memremap(u32 addr, u32 len) { } // Return the value of a linker script symbol (see scripts/layoutrom.py) -#define SYMBOL(SYM) ({ extern char SYM; (u32)&SYM; }) +#define SYMBOL(SYM) ({ extern char SYM[]; (u32)SYM; }) #define VSYMBOL(SYM) ((void*)SYMBOL(SYM)) #endif // memmap.h