[Libguestfs] [nbdkit] [filter/nozero] large binary size with GCC 9
Eric Blake
eblake at redhat.com
Fri Jul 5 13:48:10 UTC 2019
On 7/5/19 8:21 AM, Thomas Weißschuh wrote:
> On Fri, 2019-07-05T08:04-0500, Eric Blake wrote:
>> On 7/4/19 1:38 PM, Thomas Weißschuh wrote:
>>> In filter/nozero a 64M large, static, zeroed, read-only array is declared.
>>> The new behavior of GCC puts this array as-is into the binary inflating the
>>> size by a factor of around 10000.
>>
>> Odd that you are only seeing this for the nozero filter, since we also
>> have the same sort of buffer in server/plugins.c. Oh, I see a
>> difference between the two - one is function-local, the other is
>> file-local. Does this patch make a difference? (I need to fire up a
>> rawhide VM to test it myself...)
Thanks for your fast reply - you did beat me in getting my rawhide VM
running.
> It actually also happens for server/plugins.c.
Good to know. So the fix is indeed removing 'const', rather than
reducing scope (although I might as well reduce scope while at it, for
consistency).
The fix is in git now.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190705/4fa997ee/attachment.sig>
More information about the Libguestfs
mailing list