From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugen.Hristev at microchip.com Date: Mon, 19 Nov 2018 08:23:01 +0000 Subject: [U-Boot] [PATCH 4/4] ARM: at91: lds: add test SPL binary size and bbs size In-Reply-To: <1542615470-17992-1-git-send-email-eugen.hristev@microchip.com> References: <1542615470-17992-1-git-send-email-eugen.hristev@microchip.com> Message-ID: <1542615470-17992-5-git-send-email-eugen.hristev@microchip.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Wenyou Yang Add the test for the SPL binary size and the bbs section size. Signed-off-by: Wenyou Yang --- arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds b/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds index eca78f8..82098dc 100644 --- a/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds +++ b/arch/arm/mach-at91/arm926ejs/u-boot-spl.lds @@ -48,3 +48,13 @@ SECTIONS __bss_end = .; } >.sdram } + +#if defined(CONFIG_SPL_MAX_SIZE) +ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \ + "SPL image too big"); +#endif + +#if defined(CONFIG_SPL_BSS_MAX_SIZE) +ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ + "SPL image BSS too big"); +#endif -- 2.7.4