[U-Boot] [PATCH 1/2 v6] Make libgcc inclusion from common Makefile overridable by platform config file

Scott Wood scottwood at freescale.com
Thu Jul 16 17:56:45 CEST 2009


On Thu, Jul 16, 2009 at 05:42:27PM +0200, Wolfgang Denk wrote:
> Dear Scott Wood,
> 
> In message <4A5F4913.5030808 at freescale.com> you wrote:
> > 
> > So how do you propose that illegal divide operations be reported to the 
> > application?
> 
> In the same way as Linux is doing it (i. e. usually nothing at all) ?

Yay bugs.

> > What is so unreasonable about having a function to print a message and 
> > dump registers?
> 
> We didn't need one for the so far. What exactly do we need it for now?

For the same reason we have cpu/*/traps.c.

> > You could even make it a weak symbol that stays at NULL, so any attempt 
> > to call it will trap that way (assuming NULL pointers are trapped in 
> > U-Boot on that architecture...).
> 
> As you know, they are not.

If you're happy with not making it debuggable, then there's no need to
trap on the NULL -- just make sure it never happens. :-)

I'd much rather spend the handful of bytes on at least a
__builtin_trap(), though.

Or do compiler implementation specific things such as reimplementing
libgcc functions or carefully avoiding generating calls to them, if you
prefer.  Whatever.

-Scott


More information about the U-Boot mailing list