> From: Joerg Sonnenberger [mailto:jo...@bec.de] > Sent: 03 August 2017 15:12 > To: cfe-commits@lists.llvm.org > Cc: Simon Dardis > Subject: Re: r309940 - [mips] Implement -muninit-const-in-rodata > > On Thu, Aug 03, 2017 at 02:01:17PM -0000, Simon Dardis via cfe-commits > wrote: > > Author: sdardis > > Date: Thu Aug 3 07:01:17 2017 > > New Revision: 309940 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=309940&view=rev > > Log: > > [mips] Implement -muninit-const-in-rodata > > > > This option when combined with -mgpopt and -membedded-data places all > > uninitialized constant variables in the read-only section. > > I don't get it. Why is this preferable to just forbidding the use of common > variables in first placce? > > Joerg
This was added for feature parity with GCC. as -membedded-data changes how data is laid out in the binary. Using -fno-common places the item in the .bss section which takes up memory at runtime. Both of those options are provided to reduce the amount of memory required for some embedded programs. Thanks, Simon _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits