From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1416 invoked by alias); 19 Mar 2002 11:56: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 1343 invoked by uid 71); 19 Mar 2002 11:56:04 -0000 Date: Tue, 19 Mar 2002 03:56:00 -0000 Message-ID: <20020319115604.1336.qmail@sources.redhat.com> To: pb@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Philip Blundell Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT) Reply-To: Philip Blundell X-SW-Source: 2002-03/txt/msg00703.txt.bz2 List-Id: The following reply was made to PR target/3925; it has been noted by GNATS. From: Philip Blundell To: Richard Earnshaw Cc: gcc-gnats@gcc.gnu.org, pb@gcc.gnu.org, fnf@ninemoons.com, gcc-bugs@gcc.gnu.org, rearnsha@gcc.gnu.org Subject: Re: target/3925: [ARM/Thumb] Assembler chokes on branches with (PLT) Date: 19 Mar 2002 11:50:08 +0000 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.