This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] ARM support for long calls
- From: Christophe LYON <christophe dot lyon at st dot com>
- To: binutils at sourceware dot org
- Date: Wed, 02 Apr 2008 17:29:05 +0200
- Subject: Re: [patch] ARM support for long calls
- References: <47F1051A.3030107@st.com> <200804011510.45346.paul@codesourcery.com>
Thanks for your feedback.
On 01.04.2008 16:10, Paul Brook wrote:
There are several issues with this implementation:
- ARMv4t arm->thumb interworking is broken (You have to use bx to switch
modes, ldr pc does not work). You also get stray __foo_from_arm symbols
- ARMv4t thumb->arm interworking is broken. It generates blx instructions,
which arm ARMv5 only.
I didn't really focus on ARMv4t because we use only more recent
variants. Would a patch doing nothing for ARMv4t be acceptable?
- You can't use ARM code unless the object already does so (it won't work on M
profile devices).
OK. What is the appropriate query to check M variants? From what I see,
in the linker we can only check Tag_CPU_arch whose value TAG_CPU_ARCH_V7
is not precise enough.
- You aren't obeying --pic-veneer
I missed this one because I first worked on a 2.17 based branched.
BTW, I took me a little while to find the corresponding doc: why is it
listed in the "Motorola 68HC11" section?
- Mapping symbols for long call veneers are incorrect.
I was not aware of these. I'll fix elf32_arm_output_arch_local_syms()
- Thumb-2 b.w calling a far away arm function is silently generates broken
code.
I'll check that.
- BE8 mode is broken.
I wasn't aware of this mode either. From what I understand, I should
just call
put_arm_insn() rather than bfd_put_32() ?
Regards,
Christophe.