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: Richard Earnshaw <rearnsha at arm dot com>
- To: 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: Tue, 19 Mar 2002 11:09:28 +0000
- Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3925
I'm still not convinced by the need for (PLT) annotations at all. The
arguments that led to their creation don't seem to be correct, as far as
I can tell.
My understanding is as follows:
1) The linker needs to do something different to a BL instruction when
producing a shared library.
2) In order to do this, the relocation type must be different.
However, I strongly believe that 2 is false. The reasons are as
follows.
1) When building a shared library, whatever we do to a PLT32 type
relocation we must also do to a arm24 type relocation, since we have to
be able to support non-pic code in a shared library.
2) When not building a shared library, whatever we do to a arm24 type
relocation we must also do to a PLT32 relocation.
It therefore follows that the two are really the same, and the
justification for their separate existence is incorrect.
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.
R.