Putting an all-zero variable into BSS
Thomas Koenig
tkoenig@netcologne.de
Wed Apr 3 16:45:00 GMT 2019
Hi Andreas,
> The large default initializers are all filled with zeros which end up in
> the rodata section, like this:
>
> ... and so on. To reduce the size of the executable, it would make more
> sense to put this into the BSS section.
>
> Note that .bss is writable. There is no read-only bss section.
Well, nothing is going to write to it (this is not accessible by
user code), so that should not be a problem.
Regards
Thomas
More information about the Gcc
mailing list