From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from complete.lackof.org (complete.lackof.org [198.49.126.79]) (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 6210D21A02923 for ; Thu, 25 May 2017 14:24:57 -0700 (PDT) Received: from localhost (c-107-2-141-92.hsd1.co.comcast.net [107.2.141.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by complete.lackof.org (Postfix) with ESMTPSA id 80FEC33E03B5; Thu, 25 May 2017 15:24:56 -0600 (MDT) Date: Thu, 25 May 2017 15:24:56 -0600 From: dann frazier To: Ard Biesheuvel Cc: Leif Lindholm , Yonghong Zhu , Liming Gao , "edk2-devel@lists.01.org" Message-ID: <20170525212456.zxlmhaxvckemc3gv@xps13.dannf> References: <20170524202618.kgxxlewemfn4rpho@xps13.dannf> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170306 (1.8.0) X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on complete.lackof.org Subject: Re: [PATCH v2] BaseTools/GCC ARM/AARCH64: Force disable PIE X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 21:24:57 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 24, 2017 at 03:27:07PM -0700, Ard Biesheuvel wrote: > On 24 May 2017 at 13:26, dann frazier wrote: > > v2: > > * Replace -no-pie w/ -static for compat with GCC 4.9 > > > > For my understanding, could you elaborate on what goes wrong if you > omit -static / -no-pie? Well, nothing... now :) -static/-no-pie was avoiding an issue with GenFw: ----------- "GenFw" -e SEC -o /tmp/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore/DEBUG/ArmPlatformPrePeiCore.efi /tmp/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore/DEBUG/ArmPlatformPrePeiCore.dll GenFw: ERROR 3000: Invalid WriteSections64(): /tmp/edk2/Build/ArmVirtQemu-AARCH64/DEBUG_GCC49/AARCH64/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore/DEBUG/ArmPlatformPrePeiCore.dll AARCH64 small code model requires identical ELF and PE/COFF section offsets modulo 4 KB. [...] ----------- Upon rebase/retest, I found that this was no longer reproducible. Bisection shows that the problem went away recently after this commit: commit 00b00cc57bfe0fca54c904d4dd44a263e243c88b Author: Ard Biesheuvel Date: Fri May 19 11:47:40 2017 +0100 BaseTools/Scripts: discard .gnu.hash section in GCC builds -*f*no-pie does still seem to be needed though. Without it, the ARM build fails with: ----------- "GenFw" -e DXE_DRIVER -o /tmp/edk2/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi /tmp/edk2/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll GenFw: ERROR 3000: Invalid /tmp/edk2/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll: Bad definition for symbol '_GLOBAL_OFFSET_TABLE_'@0x5e94 or unsupported symbol type. For example, absolute and undefined symbols are not supported. ----------- -dann