From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77826 invoked by alias); 2 Apr 2019 22:11:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 77811 invoked by uid 89); 2 Apr 2019 22:11:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPAM_BODY,SPF_PASS autolearn=no version=3.3.1 spammy=H*i:sk:fbb13f0, H*f:sk:fbb13f0, H*M:home, H*MI:home X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Apr 2019 22:11:08 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44Yk1k0TQbz1rCWK; Wed, 3 Apr 2019 00:11:05 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44Yk1j5jN5z1r3tG; Wed, 3 Apr 2019 00:11:05 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id eWBXvtAYp-_Q; Wed, 3 Apr 2019 00:11:04 +0200 (CEST) Received: from igel.home (ppp-46-244-169-227.dynamic.mnet-online.de [46.244.169.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 3 Apr 2019 00:11:04 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 614092C102A; Wed, 3 Apr 2019 00:11:04 +0200 (CEST) From: Andreas Schwab To: Thomas Koenig Cc: gcc mailing list , "fortran\@gcc.gnu.org" Subject: Re: Putting an all-zero variable into BSS References: X-Yow: WHO sees a BEACH BUNNY sobbing on a SHAG RUG?! Date: Tue, 02 Apr 2019 22:11:00 -0000 In-Reply-To: (Thomas Koenig's message of "Wed, 3 Apr 2019 00:01:59 +0200") Message-ID: <87ef6koy6f.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-04/txt/msg00035.txt.bz2 On Apr 03 2019, Thomas Koenig wrote: > The large default initializers are all filled with zeros which end up in > the rodata section, like this: > > .text > .globl __types_module_MOD___def_init_types_module_Archive_type > .section .rodata > .align 32 > .type __types_module_MOD___def_init_types_module_Archive_type, > @object > .size __types_module_MOD___def_init_types_module_Archive_type, > 262144 > __types_module_MOD___def_init_types_module_Archive_type: > .zero 262144 > > ... 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."