linker crash in arm stub generation

Christophe LYON christophe.lyon@st.com
Fri Jun 12 13:19:00 GMT 2009


Hi Phil and Nick,

On 12.06.2009 14:35, Nick Clifton wrote:
> Hi Phil,
> 
>> This testcase causes the linker (CVS head from a couple of days ago,
>> arm-linuxgnueabi target) to segfault in arm_build_one_stub():
> 
> Please could you open a bug report for this bug ?
> 
> Once you have done that, please try out this patch which I think should 
> solve the problem.
> 


I think your patch is not adequate: it will prevent the stub code from 
being generated, but the user code will still jump to the stub. So the 
link won't fail, but the result will be wrong.

Instead, I propose this patch, which prevents mode-switching stub 
generation when the call goes through a PLT entry.

I think there should already be a test for this in the testsuite, I have 
probably forgotten this configuration.

Christophe.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: elf32-arm.c.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20090612/36fb4c23/attachment.ksh>


More information about the Binutils mailing list