public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: Don't use printf() in SPL builds
@ 2012-03-03 20:33 Simon Glass
  2012-03-05  8:21 ` Stefan Roese
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Simon Glass @ 2012-03-03 20:33 UTC (permalink / raw)
  To: u-boot

raise() likes to call printf() if it is available, but in SPL builds it
either is not available, or adds a large chunk to the resulting image
size.

So don't call it even if it is available.

This change reduces SPL size from 10KB to 6.3KB on hawkboard, for
example, using generic relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/arm/lib/eabi_compat.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index 2028dbd..44eebe0 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -13,7 +13,8 @@
 
 int raise (int signum)
 {
-#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
+	/* Even if printf() is available, it's large. Punt it for SPL builds */
+#if !defined(CONFIG_SPL_BUILD)
 	printf("raise: Signal # %d caught\n", signum);
 #endif
 	return 0;
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-05-07 22:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 20:33 [U-Boot] [PATCH] arm: Don't use printf() in SPL builds Simon Glass
2012-03-05  8:21 ` Stefan Roese
2012-03-10  8:33 ` Sughosh Ganu
2012-03-15  3:47   ` Simon Glass
2012-03-15  5:13     ` Heiko Schocher
2012-03-15  5:23       ` Simon Glass
2012-03-15  5:29         ` Heiko Schocher
2012-03-15  7:37         ` Christian Riesch
2012-03-15 16:23           ` Simon Glass
2012-03-16 18:20     ` Sughosh Ganu
2012-05-07 12:28 ` Stefan Roese
2012-05-07 22:51   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox