This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM stub sizing fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]