[ARM] global Thumb to ARM branches broken

Christophe LYON christophe.lyon@st.com
Fri Feb 5 13:44:00 GMT 2010


>> I don't understand why your patch to md_pcrel_from_section does not
>> involve S_IS_EXTERNAL, while your patch to md_apply_fix does. Could you
>> explain it to me?
>
> IIRC because md_pcrel_from_section is never called for an external
> unresolved reference or even if it is the base value should always be
> 0 ?

S_IS_EXTERNAL does not mean "external unresolved reference", and I am 
just adding test cases to cover these cases as well, which takes time. 
And as I am out of luck, now I have found a bug in objdump :-(


>
> I think the solution would be that base in md_pcrel_from_section should
> not be reset when the 2 segments aren't the same i.e. each of the relocs
> should make sure that `base' is reset only for internal . I tried this
> patch and things worked with no regressions and it appeared to also fix
> your case.
>
Yes, my current patch is very similar, but adding tests to cover every 
line of new code takes time (especially as it triggers oddities or bugs 
elsewhere :-)

Christophe.



More information about the Binutils mailing list