This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM stub sizing fix
- From: Alan Modra <amodra at gmail dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: Christophe LYON <christophe dot lyon at st dot com>, binutils at sourceware dot org
- Date: Fri, 5 Feb 2010 16:02:15 +1030
- 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> <1265300798.9961.40.camel@e102111-lin.cambridge.arm.com>
On Thu, Feb 04, 2010 at 04:26:38PM +0000, Matthew Gretton-Dann wrote:
> 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.
This is because the arm_type_of_stub call in elf32_arm_size_stubs
returns arm_stub_long_branch_v4t_thumb_arm but when called in
elf32_arm_final_link_relocate you get
arm_stub_long_branch_v4t_thumb_thumb. st_type differs in the two
calls. I think the changes to sym_flags for plt calls in
elf32_arm_final_link_relocate should be moved into arm_type_of_stub,
but I don't understand the arm back end well enough to fix this
without spending quite some time on it. I don't have the time to
continue with this patch. Sorry.
--
Alan Modra
Australia Development Lab, IBM