Date: Mon, 10 Jan 2022 19:45:27 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: Markus Wichmann <nullplan@....net> Cc: musl@...ts.openwall.com, Rui Ueyama <rui314@...il.com> Subject: Re: [PATCH] Explicitly pass the -fno-common flag * Markus Wichmann <nullplan@....net> [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.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.