6.7.6.6.15 -fno-zero-initialized-in-bss

If the target supports a BSS section, the compiler by default puts variables that are initialized to zero into BSS. This can save space in the resulting code.

This option turns off this behavior because some programs explicitly rely on variables going to the data section - e.g., so that the resulting executable can find the beginning of that section and/or make assumptions based on that.

The default option is -fzero-initialized-in-bss.

If a variable is not initialized, it will be zero-initialised in a BSS section regardless of either option.

Note: Libraries will not honor this compiler option because they will be linked in.