This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM stub sizing fix
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: binutils at sourceware dot org, amodra at gmail dot com
- Date: Thu, 04 Feb 2010 16:26:38 +0000
- Subject: Re: ARM stub sizing fix
- References: <20100114115528.GA8112@bubble.grove.modra.org> <20100114141014.GA3850@caradoc.them.org> <20100114144708.GB8112@bubble.grove.modra.org> <20100114151142.GA8613@caradoc.them.org> <20100114153342.GC8112@bubble.grove.modra.org> <20100114194814.GA27448@caradoc.them.org> <20100114235333.GD8112@bubble.grove.modra.org> <4B5584C0.7070501@st.com>
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