From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 9BCC13857810 for ; Tue, 29 Sep 2020 13:55:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9BCC13857810 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=matz@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B419EACDF; Tue, 29 Sep 2020 13:55:06 +0000 (UTC) Date: Tue, 29 Sep 2020 13:55:06 +0000 (UTC) From: Michael Matz To: Pedro Alves cc: binutils@sourceware.org Subject: Re: [PATCH] Support SHF_GNU_RETAIN ELF section flag In-Reply-To: <810fbf87-ed6d-9d11-62ba-c92dd75b52b8@palves.net> Message-ID: References: <20200922202933.kgflmtnwzkdrmrvs@jozef-acer-manjaro> <20200928122822.nql5aatbpo7kr5si@jozef-acer-manjaro> <7982913d-90a3-c435-d152-b18f46cad62c@palves.net> <810fbf87-ed6d-9d11-62ba-c92dd75b52b8@palves.net> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 29 Sep 2020 13:55:09 -0000 Hello, On Tue, 29 Sep 2020, Pedro Alves wrote: > > We should remember that this thread is about the addition of the section > > flag, which affects but isn't directly related to how it's going to be > > used in source code in a high level language. If it's the pre-existing > > "used" or a new "retain" attribute, or an attribute at all or just left to > > section markers or pragmas: a discussion about that doesn't need to hold > > up the addition of the ELF feature. > > I never suggested that it should (hold up the ELF feature). Okay. > I was replying to this in the original message: > > > The overall intention for this new flag is to enable a new "retain" > > attribute to be applied to declarations of functions and data in the > > source code. This attribute can be used to ensure the definition > > associated with the declaration is present in the linked output file, > > even if linker garbage collection would normally remove the containing > > section because it is unused. > > Discussing the intention of a new proposed mechanism seems apropos. > Sometimes the high level usage model influences the low level design too. Definitely. But used vs retain attribute seemed like a too detailed distinction to make at this point. For the GCC patches it's totally appropriate, though, as planned. Ciao, Michael.