From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 18 Oct 2012 14:45:51 -0600 Subject: [U-Boot] [PATCH 3/4] ARM: tegra: check for SPL size overflow in makefile In-Reply-To: <20121018162721.GO27770@bill-the-cat> References: <1350424209-11186-1-git-send-email-swarren@wwwdotorg.org> <1350424209-11186-3-git-send-email-swarren@wwwdotorg.org> <20121018162721.GO27770@bill-the-cat> Message-ID: <50806A7F.90206@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/18/2012 10:27 AM, Tom Rini wrote: > On Tue, Oct 16, 2012 at 03:50:08PM -0600, Stephen Warren wrote: > >> From: Stephen Warren >> >> If the SPL extends beyond CONFIG_SYS_TEXT_BASE, then it will >> likely corrupt the main U-Boot binary during execution, causing >> the main U-Boot binary to fail. Check for this situation during >> the build to avoid extremely annoying and hard-to-find bugs. Note >> that checking the size of u-boot-spl.bin is not enough, since BSS >> size doesn't affect the size of u-boot-spl.bin. >> >> Signed-off-by: Stephen Warren > > Can't you do this in the linker script like we do for other SPL > size constraints? Or am I just mis-reading how this is unique and > that link-time check can't be used? Thanks! Ah, there aren't any such checks in the linker script I looked at, so I wasn't aware of this capability. I found the following in a different linker script: ASSERT(__bss_end__ <= 0xfff01000, "NAND bootstrap too big"); I agree using that technique would make sense; I'll try it out.