target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT)
Philip Blundell
pb@nexus.co.uk
Tue Mar 19 04:44:00 GMT 2002
On Tue, 2002-03-19 at 11:09, Richard Earnshaw wrote:
> Even if it could be shown that the two relocation types must be
> different, then there is no reason for annotating the label in this
> way. When assembling PIC code all BL type instructions should generate
> a PLT32 relocation (assuming any relocation is required at all) and when
> not generating PIC code all BL type instructions should generate an
> arm24 relocation. Hence it is possible to determine the relocation type
> required simply by the presence of the -k flag on the assembler command
> line: no annotation of the labels is required.
Yes, quite.
There's no reason that -k couldn't cause the assembler to emit all
branches as PLT32 relocs rather than PC24. It just happens that Pat and
Scott chose to follow the example of the i386-linux port, where the
assembler just ignores -k altogether and the compiler adds "@plt"
decorations to call instructions.
I don't see any particularly compelling arguments for either approach
over the other, to be honest. It would be easy enough to make gas take
notice of -k, and then gcc could do whatever it likes.
p.
More information about the Gcc-bugs
mailing list