From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96231 invoked by alias); 3 Mar 2020 21:20:49 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 96223 invoked by uid 89); 3 Mar 2020 21:20:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_INFOUSMEBIZ,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=designing, lean, H*F:D*me X-HELO: NAM11-BN8-obe.outbound.protection.outlook.com Received: from mail-bn8nam11olkn2017.outbound.protection.outlook.com (HELO NAM11-BN8-obe.outbound.protection.outlook.com) (40.92.20.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Mar 2020 21:20:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QCXVtXiEQullIBnxWnEdgwXJ/skz+1CBRepxIR8Cwcz7U8hvLZCv5YtjLsHyzm7DjeO+ELYw4QiviymNtBOqphLABIyPEMPMhC48wWpFyivet2gSG+fXmru/OvnLkf1U8+mlLPR8nVmUoY39ztftGOeC98TPe8Wmp4WEzCZVH7ebHP7mwolaJikx1QH5XQuccu5tEKRXgGxyaSY1bVjfRdimM5MBCwSyuhwWXpHzYTLmUZ5CQdPaNSbFPpZIxl+Vjw4lJ3sJtoVqfy9tKBWsvwLptCSuSKUNfZ3eWZaHVSSE/NwWfPYkzf5bjFYPP+26uy8rUbCYfEHUa8+6ncOexg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9BfudE5S0oLWs4RS0+6B6tI4j3sgYOeMXs38M0UCpTk=; b=PSTBUPuehyuro45k9FtADvv2VqzRQW0vRIpWVt58kAbydjZWh64QKM66U/9jcmDr7nTNSIHf3M3CjPvPuZJ1PUIHd6FOEftJ1ws9HJFyf8SRIZ5U/vKe+P7yYgoMEV5Q5RHDL+OiMo3wqWtRZj8WTFw+DJ4p5mLpAubee75J7xTU/UFFk4ZtPHv49Xj2b0AAqpN0OADKAcG2YwH62yt0ppqoWGvmKzd3/gm6JDmoCTTyaqRGPTqnMHOxsYfOgTOxRwXYyGU9n7YDq6cQ/v0dneM/giI0bD8uHnIQyYwks3Eb992wXlR6S3SC9W+sdTHef6ctNK8tpQ59bWBvD9lqhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=maskray.me; dmarc=pass action=none header.from=maskray.me; dkim=pass header.d=maskray.me; arc=none Received: from BN8NAM11FT028.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::38) by BN8NAM11HT142.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11; Tue, 3 Mar 2020 21:20:44 +0000 Received: from BY5PR07MB7316.namprd07.prod.outlook.com (2a01:111:e400:fc4b::37) by BN8NAM11FT028.mail.protection.outlook.com (2a01:111:e400:fc4b::225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.11 via Frontend Transport; Tue, 3 Mar 2020 21:20:44 +0000 Received: from BY5PR07MB7316.namprd07.prod.outlook.com ([fe80::9dce:8d96:403c:b724]) by BY5PR07MB7316.namprd07.prod.outlook.com ([fe80::9dce:8d96:403c:b724%6]) with mapi id 15.20.2772.019; Tue, 3 Mar 2020 21:20:44 +0000 References: <20200206073837.j4biw4rsbdy2siip@gmail.com> <20200206083347.GC5669@bubble.grove.modra.org> <20200206091914.5docw46nvgx7om6o@google.com> <20200206140912.GE5669@bubble.grove.modra.org> <20200210052104.GQ5669@bubble.grove.modra.org> In-Reply-To: <20200210052104.GQ5669@bubble.grove.modra.org> From: Fangrui Song Date: Tue, 03 Mar 2020 21:20:00 -0000 Message-ID: Subject: Empty section flags To: Alan Modra Cc: bd1976 llvm , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Return-Path: i@maskray.me X-Microsoft-Original-Message-ID: MIME-Version: 1.0 Received: from mail-qk1-f170.google.com (209.85.222.170) by MN2PR11CA0010.namprd11.prod.outlook.com (2603:10b6:208:23b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15 via Frontend Transport; Tue, 3 Mar 2020 21:20:44 +0000 Received: by mail-qk1-f170.google.com with SMTP id q18so4947320qki.10 for ; Tue, 03 Mar 2020 13:20:44 -0800 (PST) X-Microsoft-Original-Message-ID: X-MS-Exchange-AntiSpam-MessageData: DtiPE8gcSaBtxLZNaIphTCMxvCRyEvroheIejofr8hR2xov+A5wLUE9ja4eu91QjYeI1JpVGz+m73oySc6JZWJ0Nf2Rf63SK3St+4koFPxldDYZnfxukyZPvv45qcFt+jaZs108SCh2Yaoknwzwubw== X-SW-Source: 2020-03/txt/msg00053.txt On Sun, Feb 9, 2020 at 9:21 PM Alan Modra wrote: > > On Thu, Feb 06, 2020 at 05:25:33PM +0000, bd1976 llvm wrote: > > Hi Alan, thanks for the input here. I wonder if it wouldn't be more > > consistent to error in all cases - even in the case of different group > > signatures. The only exception would need to be for the special section > > names (.text, .debug_str, etc...) that the assembler has special knowledge > > of (as you explained). > > Yes, let's see how that goes. > https://sourceware.org/ml/binutils/2020-02/msg00129.html > > > I wonder why creating multiple sections with the > > same name for section directives with different group signatures was > > implemented - why not just require the use of a distinct section name for > > these? > > I think plain ".text" for a group's text section is fine. Distict > names would just be yet another thing to track for a group. > > > Or, now that GNU has the ",unique,N" assembly extension ( > > https://sourceware.org/ml/binutils/2020-02/msg00028.html) that could be > > used if the section name is fixed - it would then be explicit in the source > > code that another section with the same name will be created. > > Perhaps, but we aren't designing a new toolchain. Backwards > compatibility can't be discarded without compelling reasons. > > -- > Alan Modra > Australia Development Lab, IBM For empty flags, should there be an error as well? .section .foo,"ax",@progbits; .byte 1 .section .foo,"",@progbits; .byte 2 # no diagnostic .section .foo,"a",@progbits; .byte 3 # Error: changed section attributes for .foo Context: https://github.com/ClangBuiltLinux/linux/issues/913 I lean toward an error for consistency, and I will try making the LLVM MC side rule stick.