[U-Boot] [PATCH] [x86] Wrap small helper functions from libgcc to avoid an ABI mismatch

Mike Frysinger vapier at gentoo.org
Tue Nov 8 14:33:06 CET 2011


On Tuesday 08 November 2011 04:27:44 Gabe Black wrote:
> When gcc compiles some 64 bit operations on a 32 bit machine, it generates
> calls to small functions instead of instructions which do the job directly.
> Those functions are defined in libgcc and transparently provide whatever
> functionality was necessary. Unfortunately, u-boot can be built with a
> non-standard ABI when libgcc isn't. When the two are linked together, very
> confusing bugs can crop up, for instance seemingly normal integer division
> or modulus getting the wrong answer or even raising a spurious divide by
> zero exception.

might be good to explicitly mention that this is due to u-boot using -mregparm

> --- a/arch/x86/config.mk
> +++ b/arch/x86/config.mk
>
> +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds

looks like some old code sneaked in.  bad rebase ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111108/ce4175e8/attachment.pgp 


More information about the U-Boot mailing list