[coreboot] [PATCH] libgcc regparm workaround

Segher Boessenkool segher at kernel.crashing.org
Mon Sep 28 01:52:40 CEST 2009

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

Obvious to you perhaps, but not to me, that's why I asked :-)

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

Yes, sure, supposedly nothing else requires the object file where  
is defined.  I see.

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

I think you read wrong then: every single target uses abort().  The
difference you are seeing could be that PowerPC uses it in the  

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


Look, it just looked to me like some legacy thing that could use some
cleaning up.  Obviously it still has value.


More information about the coreboot mailing list