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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-12-18 12:08:53 -05:00
parent 0a1e7675f7
commit 98dd53b994
1 changed files with 1 additions and 1 deletions

View File

@ -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