From patchwork Thu May 18 02:52:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 95625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp199333vqo; Wed, 17 May 2023 19:53:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AN82abRh5yQtqX9Sl6J5XLs38yG3RV6I0sV6haghjCV2EmLIdFvGYyljsEDmGpgto9mFE X-Received: by 2002:a17:907:1c0e:b0:966:4d11:7887 with SMTP id nc14-20020a1709071c0e00b009664d117887mr4591776ejc.4.1684378383110; Wed, 17 May 2023 19:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684378383; cv=none; d=google.com; s=arc-20160816; b=kSNUi2bA/Pa9Lwu6OMMDWLgtC8vhCnRn/BXC+cHUqDIN4Im/DZ3if4WDAVRJsg9cVj VpC8tPxbmCSVOZT8tuUtUAF26HTAupiocvSS6pRdmQJpvGOewxSnGuIhCV1fS8sIRk7L PzWPvOuiLuUqNdY37M00pF9sE4AulYPuEz6MGSnBoKIqg9yEHyuZAflUiZ9W2W9Qo8ub yuyTA7/CmxrwZr5ATgjzxV+begHers0oTbeITtQsyWFYsOQhIQmhvNJt8gs3DhfGQRDC VrHVZXEir4RhHHfjYPKVOMTNou5z7d2+nphBsi4wmXomK3iTq8h3uPyIl8zpFw1pKBqi 81NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=YIBa6hFiFrePrV9sndbiwvAyfws11Bn2wkt/1wqKVzM=; b=Ur2oPZ7JTrspTRsCy5vd/i5HMHKhiHxjM5cmF4kgUZQ6bJSPuZGfly3bCPO1jGAObh Mml+j9Fz/jyGhFRkltKO173pBWnc8O7q1WerL6EhqHPP2EptL2TBWDpmgT7DtKRzkNoa LybjkUTVEiDjuipLpkj24k6DRsJvpb1oOBPO1q4RYiX1/S5CHBowd1ND+pzh6pXbSmwc dWfMXLOfmuKk1HZzukKVoxadZOyM3ZvlYPk4G9h5Yc5np5y4e3JDJtJEnuPyjx8AoldB 9KC+GqZ0rKfmWv2ZA+FWjPZftg+vjDS08gz9L13siUOKxYI0ZvNZLT8QHL6N8qvpf9Iw lYxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=sLQfhKOj; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u15-20020a170906068f00b00969d1e0a7a7si500422ejb.762.2023.05.17.19.53.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 19:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=sLQfhKOj; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE1103857014 for ; Thu, 18 May 2023 02:53:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE1103857014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684378381; bh=YIBa6hFiFrePrV9sndbiwvAyfws11Bn2wkt/1wqKVzM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=sLQfhKOjUs5RXqs0CKwBvf/7F/MasRfWazlOR52AYHOp4XlqERzaMLQcnTufMaOm/ RR9jda+SdmvNfj/WDZrE8OMsEejyt2wzpwFNj65Ik/01UgHqH/A/igkNnDm0ttXo3j T311o3aJ7CYf4lViTTES4OyLFCOR5or0PBezrEiw= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id BF97E3858C5F for ; Thu, 18 May 2023 02:52:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BF97E3858C5F Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-52c30fa5271so796556a12.0 for ; Wed, 17 May 2023 19:52:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684378371; x=1686970371; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YIBa6hFiFrePrV9sndbiwvAyfws11Bn2wkt/1wqKVzM=; b=R7eYsPykoukh2x9ajbqLfWts2GS/Jhwj0ThqyBcRpWOqgC+13MOYr4KVeKUVlcEcpT rqiaU/ywH44aFrMTdEjsdtQgwqjIzb2ykoGTivoGCnGHTLDGEXUBuWIIIg04u5iJQJrt CUps/PUlKuGLAreDUmF4Rjlt+LGtuWxEhSFizai29eutT7oaD3EptRT6+nuFIbqobeJA d9qyn9pmsxyTOiFuXn29114h6q4MIG7bady3mT/ZudXZsVnGrkKeSKMYPRlEEhn3fB6q M0MThQ0AaSNh2XlFp4GOZLAFSUmLCaKRb1fxAvvUGTDum++W9GmrbhRxWwCPp6JrTkU8 FUrw== X-Gm-Message-State: AC+VfDyrUd/Dw2Tr6H9k2GYVHWZ61k0kFIpXVO5Ig0byfY2jZ7TIEEhA eo1QaQtbzKhzIQphbm23jUGiYjfmP/0= X-Received: by 2002:a17:902:ec8d:b0:1a9:4601:a7c9 with SMTP id x13-20020a170902ec8d00b001a94601a7c9mr1335555plg.12.1684378371096; Wed, 17 May 2023 19:52:51 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id n9-20020a1709026a8900b001a221d14179sm68768plk.302.2023.05.17.19.52.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 19:52:50 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id E277D114158A; Thu, 18 May 2023 12:22:47 +0930 (ACST) Date: Thu, 18 May 2023 12:22:47 +0930 To: binutils@sourceware.org Subject: PR11601, Solaris assembler compatibility doesn't work Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766198747264498480?= X-GMAIL-MSGID: =?utf-8?q?1766198747264498480?= Well, it doesn't work on x86 or ppc, which both have # starting comments anywhere on a line. I think it is therefore only useful on sparc. PR 11601 * config/obj-elf.c (obj_elf_section_word): Only compile for sparc. (obj_elf_section): Only support solaris .section directive on sparc. * doc/as.texi (Section): Mention that solaris .section directive is only supported for sparc. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index a4cf12b144a..bf3ef541ab7 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -974,6 +974,7 @@ obj_elf_section_type (char *str, size_t len, bool warn) return 0; } +#ifdef TC_SPARC static bfd_vma obj_elf_section_word (char *str, size_t len, int *type) { @@ -1006,6 +1007,7 @@ obj_elf_section_word (char *str, size_t len, int *type) return 0; } +#endif /* Get name of section. */ const char * @@ -1388,6 +1390,7 @@ obj_elf_section (int push) input_line_pointer = save; } } +#ifdef TC_SPARC else { do @@ -1413,6 +1416,7 @@ obj_elf_section (int push) while (*input_line_pointer++ == ','); --input_line_pointer; } +#endif } done: diff --git a/gas/doc/as.texi b/gas/doc/as.texi index ea40a9ed75e..ea18df24b14 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -6958,7 +6958,7 @@ the section name is not recognized, the default will be for the section to have none of the above flags: it will not be allocated in memory, nor writable, nor executable. The section will contain data. -For ELF targets, the assembler supports another type of @code{.section} +For SPARC ELF targets, the assembler supports another type of @code{.section} directive for compatibility with the Solaris assembler: @smallexample