ARM stub sizing fix
Matthew Gretton-Dann
matthew.gretton-dann@arm.com
Thu Feb 4 16:26:00 GMT 2010
On Tue, 2010-01-19 at 11:09 +0100, Christophe LYON wrote:
> On 15.01.2010 00:53, Alan Modra wrote:
> > On Thu, Jan 14, 2010 at 02:48:20PM -0500, Daniel Jacobowitz wrote:
> >> Yes, this is busted.
> >
> > Easily fixed. Breaks arm-call test due to different stub ordering,
> > but I'll leave fixing the testsuite to an ARM maintainer.
> >
>
> I have tried your patch, and it breaks a few other tests too, mainly due
> to different stub ordering as you say, but farcall-mixed-app and
> farcall-mixed-lib.so also fail to link.
>
> I am looking at why they now fail (using CVS trunk, target arm-none-eabi).
I've also seen these failures on CVS trunk, target arm-none-eabi.
For example: farcall-mixed-app is failing with the following error:
tmpdir/farcall-mixed-app.o: In function `app_tfunc':
(.far_thumb+0x2): relocation truncated to fit: R_ARM_THM_CALL against symbol `lib_func2' defined in .plt section in tmpdir/mixed-lib.so
This seems to be because after applying the patch the call to
elf32_arm_get_stub_entry() at about line 7510 of elf32-arm.c returns
NULL for this relocation. Before the patch was applied it returned
non-NULL.
The 'obvious' fix of changing the call to arm_stub_hash_lookup() made by
elf32_arm_get_stub_entry() to pass TRUE for the create parameter (around
elf32-arm.c:3324) causes the tests to 'pass' (they still fail - but only
due to stub ordering changes). However, I do not know what other
effects it has and whether that is a safe change. Could someone with
more knowledge of this area take a look please, and make some comments?
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
More information about the Binutils
mailing list