On Thu, Apr 4, 2019 at 9:53 PM Thomas Koenig <tkoe...@netcologne.de> wrote: > > Hi Andreas, > > >> Well, nothing is going to write to it (this is not accessible by > >> user code), so that should not be a problem. > > Then don't make it read-only. > > I tried this, and while it solves the executable size problem, it > causes an OpenMP regression (see > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84487#c22 ), > so now I am out of ideas. > > Oh well, I would have liked fixing this before 9.0, but it > seems that this may not be possible.
Putting readonly data into .rodata isn't required by the C standard I think so we could freely choose .bss for data exceeding a reasonable size limit. IIRC GCC behaved one or another way in the past already and the last change might be due to security concerns. Btw, large all-zeros constant objects don't make very much sense... Richard.