aboutsummaryrefslogtreecommitdiff
path: root/skiboot.lds.S
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-11-11 15:44:41 +1000
committerOliver O'Halloran <oohall@gmail.com>2019-11-11 18:35:00 +1100
commit3734172b0f40aa4b742f65aa8293476ca26916e5 (patch)
tree4dee3229cccd86ecc572bb42a2e4403caa8faa88 /skiboot.lds.S
parent6b512fceb4210d5cf166912ef72c90cd29caec67 (diff)
downloadskiboot-3734172b0f40aa4b742f65aa8293476ca26916e5.zip
skiboot-3734172b0f40aa4b742f65aa8293476ca26916e5.tar.gz
skiboot-3734172b0f40aa4b742f65aa8293476ca26916e5.tar.bz2
build: fix non-constant build asserts
BUILD_ASSERT can not be used for constants generated by the assembler or linker. This results in variable length arrays that do not catch the failure condition. This was caught by sparse. Remove these and add some equivalent as/ld checks which actually do the right thing. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'skiboot.lds.S')
-rw-r--r--skiboot.lds.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/skiboot.lds.S b/skiboot.lds.S
index 32139b2..1dc0ca9 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -228,6 +228,8 @@ SECTIONS
_ebss = .;
_end = .;
+ ASSERT(HEAP_BASE >= _end, "Heap collision with image")
+
DEBUG_SECTIONS
/* Optional kernel image */