Long call support broke Thumb veneers

Christophe LYON christophe.lyon@st.com
Tue Jun 3 17:40:00 GMT 2008


Daniel,


On 03.06.2008 15:54, Daniel Jacobowitz wrote:

> Christophe, you removed handling of two relocation types from
> bfd_elf32_arm_process_before_allocation, which is responsible for
> inserting these stubs.  How do you intend they be handled?
> record_arm_to_thumb_glue is now never called for them.
> 
> In general, handling long call stubs differently from mode-changing
> stubs seems like asking for trouble.
> 

Well,
While taking into account Paul's remarks, it seemed clearer to me to 
handle mode-switching stubs in the same place as long calls (ie a call 
which involves mode-switching is handled by the stubs I added, whatever 
the distance).

Unfortunately I forgot to handle this case in elf32_arm_final_link_relocate.

I propose the attached patch, which also fixes another issue (BLX was 
still used in cases where it shouldn't). I ran the testsuite with 
arm-none-eabi and arm-elf targets.

I checked with the code fragment you mentioned (using Code Sourcery 
2008q1-126 release), it seems OK to me but I am worrying about your 
generic-hosted.ld linker script: indeed, the long call stubs are 
generated before __cs3_interrupt_vector, and I suspect this is problem, 
isn't it?

Christophe.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ld.changelog
URL: <https://sourceware.org/pipermail/binutils/attachments/20080603/0d2b785b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ld.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20080603/0d2b785b/attachment-0001.ksh>


More information about the Binutils mailing list