[U-Boot] [RESEND PATCH v3] Add assert() for debug assertions

Wolfgang Denk wd at denx.de
Sun Oct 23 19:11:26 CEST 2011


Dear Mike Frysinger,

In message <CAJaTeTrUJH+p1jTU88d5KDv4EU57DiU+=_ibp9DZHXU78U1HdQ at mail.gmail.com> you wrote:
>
> >> +void __assert_fail(const char *assertion, const char *file, unsigned line,
> >> +                const char *function)
> >> +{
> >> +     /* This will not return */
> >> +     panic("%s:%u: %s: Assertion `%s' failed.", file, line, function,
> >> +           assertion);
> >> +}
> >
> > Can you please #ifdef it so it doesn't get added for the non-debug
> > case, too?
>
> most arches are building with --gc-sections now which means there is
> no overhead added for them.  should we look at fixing the few holdouts
> rather than adding #ifdefs ?

I think Power does use --gc-sections, still I see code size growing.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All your people must learn before you can reach for the stars.
	-- Kirk, "The Gamesters of Triskelion", stardate 3259.2


More information about the U-Boot mailing list