This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT)
- From: Philip Blundell <pb at nexus dot co dot uk>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: gcc-gnats at gcc dot gnu dot org, pb at gcc dot gnu dot org, fnf at ninemoons dot com, gcc-bugs at gcc dot gnu dot org, rearnsha at gcc dot gnu dot org
- Date: 19 Mar 2002 11:50:08 +0000
- Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT)
- References: <3C971C68.EB345018@arm.com>
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.