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

Detlev Zundel dzu at denx.de
Fri Jul 17 13:27:22 CEST 2009


Hi Scott,

>> > 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.

I also think that making our lifes easier is a very good thing.  Our
"it's only a bootloader" codebase is pretty complex already so I welcome
making it more robust.  I was kind of surprised the other day that
null-pointer jumps(*) did not result in immediate "bad programmer, no
cookie this time" messages but in random crashes.

Cheers
  Detlev

(*) well, actually they were jumps to _relocated_ NULL pointers, but
still ;)

-- 
I will use free software even if it is less powerful, or less reliable,
because freedom is the most important thing, and that is what the Free
Software movement is about.  How we get freedom.
                       -- Richard M. Stallman
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list