Commit 1b1d8c19 authored by Simon Goldschmidt's avatar Simon Goldschmidt Committed by Tom Rini
Browse files

spl: fix linker size check off-by-one errors



This fixes SPL linker script size checks for 3 lds files where the size
checks were implemented as "x < YYY_MAX_SIZE".

Fix the size checks to be "x <= YYY_MAX_SIZE" instead.
Signed-off-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
parent aaa64803
...@@ -79,16 +79,16 @@ SECTIONS ...@@ -79,16 +79,16 @@ SECTIONS
} }
#if defined(IMAGE_MAX_SIZE) #if defined(IMAGE_MAX_SIZE)
ASSERT(__image_copy_end - __image_copy_start < (IMAGE_MAX_SIZE), \ ASSERT(__image_copy_end - __image_copy_start <= (IMAGE_MAX_SIZE), \
"SPL image too big"); "SPL image too big");
#endif #endif
#if defined(CONFIG_SPL_BSS_MAX_SIZE) #if defined(CONFIG_SPL_BSS_MAX_SIZE)
ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ ASSERT(__bss_end - __bss_start <= (CONFIG_SPL_BSS_MAX_SIZE), \
"SPL image BSS too big"); "SPL image BSS too big");
#endif #endif
#if defined(CONFIG_SPL_MAX_FOOTPRINT) #if defined(CONFIG_SPL_MAX_FOOTPRINT)
ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \ ASSERT(__bss_end - _start <= (CONFIG_SPL_MAX_FOOTPRINT), \
"SPL image plus BSS too big"); "SPL image plus BSS too big");
#endif #endif
...@@ -52,11 +52,11 @@ SECTIONS ...@@ -52,11 +52,11 @@ SECTIONS
} }
#if defined(IMAGE_MAX_SIZE) #if defined(IMAGE_MAX_SIZE)
ASSERT(__image_copy_end - __start < (IMAGE_MAX_SIZE), \ ASSERT(__image_copy_end - __start <= (IMAGE_MAX_SIZE), \
"SPL image too big"); "SPL image too big");
#endif #endif
#if defined(CONFIG_SPL_BSS_MAX_SIZE) #if defined(CONFIG_SPL_BSS_MAX_SIZE)
ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ ASSERT(__bss_end - __bss_start <= (CONFIG_SPL_BSS_MAX_SIZE), \
"SPL image BSS too big"); "SPL image BSS too big");
#endif #endif
...@@ -57,6 +57,6 @@ SECTIONS ...@@ -57,6 +57,6 @@ SECTIONS
} }
#if defined(CONFIG_SPL_MAX_FOOTPRINT) #if defined(CONFIG_SPL_MAX_FOOTPRINT)
ASSERT(__end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \ ASSERT(__end - _start <= (CONFIG_SPL_MAX_FOOTPRINT), \
"SPL image plus BSS too big"); "SPL image plus BSS too big");
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment