Fwd: [PATCH] arm: ensure symbol is a thumb symbol in new binutils
Nick Clifton
nickc@redhat.com
Mon Jun 11 15:10:00 GMT 2018
Hi Ramana,
>> Question - is the -mno-thumb-interwork flag always used ?
>>
>> It seems to me that this flag might provide a much simpler option
>> to fix the assembler. Ie: if -mthumb-interwork is enabled then
>> the ADR pseudo-instruction should include the interworking bit (for
>> thumb function symbols), whereas if -mno-thumb-interwork is in
>> effect, then it should not.
>
> Why is -mthumb-interwork relevant for Thumb2 ? Interworking is a
> given at that level of the architecture.
True - but in the compilation example that Christophe presented to me
it was present, and so I thought that this might provide a simpler
way to resolve this issue. Since -mthumb-interwork/-mno-thumb-interwork
is intended to control the assembler's support for interworking,
it makes sense that it should also control the behaviour of the ADR
and ADRL pseudo-instructions. Even in a thumb-2 environment, the option
could still be used to control these instructions.
My hope is that if this idea works then no changes to the ARM kernel
sources would be needed. The assembler would revert back to its old
behaviour of not modifying the addresses generated by ADR/ADRL unless
the -mthumb-interwork option was enabled. (It is disabled by default).
This would satisfy the ARM kernel people, I hope, and also the people
affected by PR 21458. Minimal changes to the assembler, everyone happy.
A win/win. If the idea works, of course.
Cheers
Nick
More information about the Binutils
mailing list