From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2334 invoked by alias); 19 Mar 2002 11:16:10 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2291 invoked by uid 71); 19 Mar 2002 11:16:04 -0000 Date: Tue, 19 Mar 2002 03:16:00 -0000 Message-ID: <20020319111604.2280.qmail@sources.redhat.com> To: pb@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Richard Earnshaw Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT) Reply-To: Richard Earnshaw X-SW-Source: 2002-03/txt/msg00701.txt.bz2 List-Id: The following reply was made to PR target/3925; it has been noted by GNATS. From: Richard Earnshaw To: gcc-gnats@gcc.gnu.org, pb@gcc.gnu.org, fnf@ninemoons.com, gcc-bugs@gcc.gnu.org, rearnsha@gcc.gnu.org Cc: Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT) Date: Tue, 19 Mar 2002 11:09:28 +0000 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.