From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26890 invoked from network); 10 Jan 2022 18:45:46 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Jan 2022 18:45:46 -0000 Received: (qmail 11384 invoked by uid 550); 10 Jan 2022 18:45:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11350 invoked from network); 10 Jan 2022 18:45:43 -0000 Date: Mon, 10 Jan 2022 19:45:27 +0100 From: Szabolcs Nagy To: Markus Wichmann Cc: musl@lists.openwall.com, Rui Ueyama Message-ID: <20220110184527.GD1320090@port70.net> Mail-Followup-To: Markus Wichmann , musl@lists.openwall.com, Rui Ueyama References: <20220108232536.GC1320090@port70.net> <20220109014916.GM7074@brightrain.aerifal.cx> <20220110165015.GA2046@voyager> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220110165015.GA2046@voyager> Subject: Re: [musl] [PATCH] Explicitly pass the -fno-common flag * Markus Wichmann [2022-01-10 17:50:15 +0100]: > On Sat, Jan 08, 2022 at 08:49:17PM -0500, Rich Felker wrote: > > The one time bss is significantly preferable to common is for > > zero-initialized const objects (rare but they might appear in some > > places) since commons don't actually get made const. I don't think we > > have any of those that are commons now though. > > > > Wait, that's a possibility? I thought all constant data would be added > to .rodata. I thought that was the whole point of .rodata. const int x; with -fcommon the x is a common symbol. (the fact that it was const is lost in the .o) common symbol is treated as bss at link time, if there is no actual definition, and thus writable. with -fno-common x is rodata.