From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8A106202E617B for ; Wed, 25 Oct 2017 03:03:45 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id j15so11269393wre.8 for ; Wed, 25 Oct 2017 03:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=51y0m2Y3ryRp6OWrgxqFHZqlSn8YnQGgoM5HRvmiit8=; b=HnnhNRe7q/1Ah5CAZIcJmg2Jcidq3AhXhsInTSqt4lf0XBft73SMzkPnREfOpxkDO9 Qv/tY/fUKUoeMMZxUqXDKKCLbTh4vpXTE4/3oILx0akOX424B6po2WVo2logRVrVCEr9 5zUF90TzD6BX2ZORo9jU/dRpM7MXqhl/aVsrE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=51y0m2Y3ryRp6OWrgxqFHZqlSn8YnQGgoM5HRvmiit8=; b=KRAkTbCU1XfpVJWS0AkLZcQgeK/g1k1TR/lqLdLqlT3nh/wn5/HDm8taUtJAY/Xqsk tQstOG9DcvTxYGx65VpHvuYWFEgCZTaS/1tzq6vdNTeBqF5bH+58GzIETOHyNS7igLsm +UHyeFDQ9HAiRqbaXgC4WB4hNxeGShNpcrWTJc0jPTiKjAXEx6uws6QI7COIswgBG+mb 0y0alET8NqE/BOLLEoIiP6TGAFn0zSH0z37teA74a/8pQKqIjm4oOiQ/fpzP1nrokMXt KELyqueIRen0CxJv+elDvWIviPEQfOFbajnq2i1gULWm4C/U65zmC3FTvFfwbahd12YH UEFw== X-Gm-Message-State: AMCzsaXdKc/DANSUZWBgHJpvs3HzsKwxIfeInphVo+uKNaYafkORPfAU /y4SsgRq7AxEQwvmew75QLc7eWtv4jI= X-Google-Smtp-Source: ABhQp+TO3gNwLn4KvmKM8QLdMxe0Bh3wKPsnlMyQrLISxPsKqurnBsHMV2AMZStWLIBcN0OHV6KGrw== X-Received: by 10.223.136.51 with SMTP id d48mr1603365wrd.150.1508926048829; Wed, 25 Oct 2017 03:07:28 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id f16sm2372129wra.75.2017.10.25.03.07.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 03:07:27 -0700 (PDT) Date: Wed, 25 Oct 2017 11:07:26 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, liming.gao@intel.com, yonghong.zhu@intel.com Message-ID: <20171025100726.gzjmoft7mkqaskn5@bivouac.eciton.net> References: <20171025095511.25751-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171025095511.25751-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH] BaseTools/tools_def AARCH64: disable PIE linking 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: Wed, 25 Oct 2017 10:03:45 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 25, 2017 at 10:55:11AM +0100, Ard Biesheuvel wrote: > Some prebuilt GCC toolchains targeting aarch64 (e.g., the Debian Stretch > one) will default to building PIE executables. This has been observed to > corrupt ACPI tables built from .aslc sources, so disable PIE linking > altogether when using the GCC toolchain to build for AARCH64. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel This solves my problem. Reviewed-by: Leif Lindholm > --- > BaseTools/Conf/tools_def.template | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template > index e93c2a0bf1ef..16ef935f5ef9 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -4355,7 +4355,7 @@ DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccB > DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections > DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map > DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 > -DEFINE GCC_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 > +DEFINE GCC_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 -no-pie > DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) > DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) > DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) > -- > 2.11.0 >