From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6CD832115BE00 for ; Wed, 20 Jun 2018 11:57:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C211F8011059; Wed, 20 Jun 2018 18:57:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-149.rdu2.redhat.com [10.10.120.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C5897C24; Wed, 20 Jun 2018 18:57:27 +0000 (UTC) To: Ard Biesheuvel , Evan Lloyd Cc: "edk2-devel@lists.01.org" , nd , Stephanie Hughes-Fitt , Leif Lindholm References: From: Laszlo Ersek Message-ID: Date: Wed, 20 Jun 2018 20:57:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 20 Jun 2018 18:57:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 20 Jun 2018 18:57:30 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: Query about variable initialization X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 18:57:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/20/18 20:03, Ard Biesheuvel wrote: > On 20 June 2018 at 19:48, Evan Lloyd wrote: >> Hi Ard, Leif. >> I've noticed a number of comments like Ard's recent "We don't permit initialized automatic variables.", >> and similar changes have been made to Sami's AcpiView. Note: I'm not objecting to doing it the way maintainers prefer, which is why this is not a response. >> >> My understanding was that the CCS was changed some time back to remove the restriction on initializing variables (and I further think I remember Leif being a prime mover in that). > > I don't remember, to be honest. But I think it is a stupid rule, and > so if we haven't already, I hope we can get rid of it. > > IIRC, this limitation had something to do with a particularly nice > exhibit in the Tianocore toolchain museum that generated bigger > binaries for initialized automatic variables (as compared to > assignments performed separately). But let's not get into the > toolchain situation, shall we? One special case of initialization is when the variable in question has structure type. For such initialization the compiler may generate calls to internal helper functions (memset and friends), and then the module fails to link. I've seen this myself earlier, although I can't tell whether on gcc-4.4 or gcc-4.8. Thanks, Laszlo >> If that is the case, I suspect the real problem is with ECC.py, which still whinges about it, so probably needs fixing. >> Can you confirm that I haven't got a firm grasp on the wrong end of the stick, please? >> > > I could not find the limitation in the current version of the CCS, and > so whether it was there at /some/ point doesn't seem relevant to me. > We could file a bugzilla, and/or propose a patch that removes this > part from ECC.py (although I am not touching the python code if I can > avoid it) > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >