From: Mike Frysinger Date: Tue, 8 Nov 2011 08:33:06 -0500 Subject: [U-Boot] [PATCH] [x86] Wrap small helper functions from libgcc to avoid an ABI mismatch In-Reply-To: <1320744464-833-1-git-send-email-gabeblack@chromium.org> References: <1320744464-833-1-git-send-email-gabeblack@chromium.org> Message-ID: <201111080833.14523.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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