[coreboot] [PATCH] libgcc regparm workaround

Stefan Reinauer stepan at coresystems.de
Sun Sep 27 16:54:42 CEST 2009


Segher Boessenkool wrote:
>>> You don't need the -( -) here, FWIW.  libgcc does not require symbols
>>> from
>>> coreboot.a ;-)
>> Yes, actually it does. On powerpc libgcc uses external symbols that it
>> does not provide.
>
> Do you mean abort()?
Obviously.

> Yeah, you need to provide that yourself, on all targets (nothing
> special about PowerPC); 
See, that's why the -( -) is there. :-)

I read the libgcc source code, and only powerpc's libgcc is calling
abort(). So while theoretically others may, they don't.

I agree completely with you that gcc might change its behavior on other
platforms, which is exactly why the -( -) construct is not only used for
our powerpc port.

> the same is true for memcpy(), memset(),  memmove(), memcmp().  FWIW,
> any GCC-compiled code can require those, not
> only code in libgcc.
The -( -) construct is only needed for symbols used in libgcc, so
everything is fine. At the current point no mem* functions are used in
the libgcc functions we "use".
Even if we did, the construct would work for us without changes.

Stefan




More information about the coreboot mailing list