nozero: Work around gcc 9 size pessimization
commit91b12bf12a99ebc57fe8ceb73ac53ed73a3ed2e4
authorEric Blake <eblake@redhat.com>
Fri, 5 Jul 2019 13:39:59 +0000 (5 08:39 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 5 Jul 2019 13:45:12 +0000 (5 08:45 -0500)
treebfe82f56f7cba9c2e35b19e95d4dc1e9e101e7e0
parent3f46cf205d66d06bf9e2d2fe780d3bb18ac4d616
nozero: Work around gcc 9 size pessimization

gcc 9 decided [1] that implicitly-zero-initialized static const
buffers belong in .rodata rather than .bss (for the extra safety to
ensure you can't accidentally modify the buffer contents).  However,
this inflates our binary size.  Avoiding 'const' puts things back in
.bss, and it's still easy enough to prove (with reduced scope in
nozero.c to match what was already in plugins.c) that the buffer is
not modified in spite of dropping the keyword that would let the
compiler prove it on our behalf.

[1] https://gcc.gnu.org/ml/gcc/2019-04/msg00034.html

Reported-by: Thomas Weißschuh <thomas@weissschuh.net>
Signed-off-by: Eric Blake <eblake@redhat.com>
filters/nozero/nozero.c
server/plugins.c