From patchwork Wed Oct 25 09:55:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117072 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp648189qgn; Wed, 25 Oct 2017 02:55:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TpeDCysfrnCK4yBa/9eDn2VBy2Pt1pwg39sZ/U6yjVhVjUc20M1FssTybR+qcwNCT2dk0K X-Received: by 10.84.132.104 with SMTP id 95mr1306195ple.170.1508925323621; Wed, 25 Oct 2017 02:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508925323; cv=none; d=google.com; s=arc-20160816; b=W21xMrhZOkBCE6ZhOQjO0H4lhNdgumtcyVApBgAp0U3gCkL9JfohuQu81qar3hggiD 7ebhGSRtxng0FrnlEyI5wUnVRe5uIfiaAGuUqONtHZnXdGCEbURoLlQVmxkOVrHsnEot MiUJj7w0rAkdMwApj7LXr9+KNQlDXk2O0Fp6q1+ac6wOz0Nbemnca5c+lhF+vpE9nywg 4qaYa2O3ue0ba68dx/ne0cebapqqqRe3cLfpvSYBXMxE1ibXbQicOEYMQTeBufZonaN0 DVgjCvXn5EnFEC55IKWGRvZR/XicimTi0jqcii1rjf41HV6gh+6hx/86ouUplik3/Ucz 9Dbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=8IXXzMQWuafn07vgl5rCSV/b702RMZ7si9PB4uZ8avQ=; b=duEieLzGT8wQv42X5J/1MJk2ycbgkED2xpDrYS06NmSjbocrnmwDad/f9XrPhQG/Ps MzION0Av/px2ar3+QS35af5gAWgMw3NW+RfRTBvA6v4Rf8ImNY1xGsC+vGNgGQT8BO+L ONSfg+RgHNbd6erTWZ9Fz7DLmPUzDXh7u8C9CnENhyAI63TkS8xyl7pdtDp/Bs6nP4G/ 34BinfyEg17eouANsX3dhuBl6BTewtYhr3On5aDfQ+FLN1W5hLFOtMS86rHCnIn47wK1 vqWPYktNVeXPYLQSRbU0g8xrX89PcACSdv9+hoee2ByIdaHYV+sczsr1XorXdNrC/03z 8dSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RMWw3Qaq; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id u2si1429064plj.530.2017.10.25.02.55.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 02:55:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RMWw3Qaq; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E85E82034A7D2; Wed, 25 Oct 2017 02:51:37 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::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 2FA69202E617B for ; Wed, 25 Oct 2017 02:51:35 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id b9so768568wmh.0 for ; Wed, 25 Oct 2017 02:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NMCMwx454SneQ5Qfradu9CLSE5dpGPSwqpJtmmXi77E=; b=RMWw3QaqC3udUMOb8anYA3P5UGY/rHrl5sIMMwy0OnXVWdXBmXqr9N5GGXSVygsgmr FaJzDZldW+hvedPD6+cuvKphu61RF81vEFHG5WTGcr8a+IQLAveApbTDKnBJ/r2JeM5h XuLFd4SBzeQE+b9NZDy3TuvflqUUPYGaArWdE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NMCMwx454SneQ5Qfradu9CLSE5dpGPSwqpJtmmXi77E=; b=EvrIuz52HIdixaV7LwlL1ohjIVYGcgz6Jx8sMDG46gwIxbol596LpQbJtVO9RfaHuq B4nOPgHimocsXq6H3ZVzRfHnyMjzJuTuP0HYrQDTQfCddH+IbgvXxL1wKO5CR1wuCnwj J+dWK4u9xAF/5IomPaS4kGVj2FHqmNbsKfJzYE2zmGpLPhkMvaqtgds3s+aXcwLCvwU1 nR3yY3/6n7DErllMYE5qlNuN1yjXqxYMrVu/MSUM2oBsMFQwtcrN/fwZyc6EPaeDqS97 x/n21f7I4hO+uygJOVq+7i7B21DN53QnPpnUtUemsLdMvmJMjy5Af4XGEOuze4rxK5G4 utSw== X-Gm-Message-State: AMCzsaXIUSnSLzjIoy2dCmGdirNV4txOYv0e1hHbtiYw7xrp9SB5XlZQ 5cb2VfjQM2sQs80hDxGACOTyPELhHU8= X-Received: by 10.28.69.210 with SMTP id l79mr1212898wmi.117.1508925318920; Wed, 25 Oct 2017 02:55:18 -0700 (PDT) Received: from localhost.localdomain ([160.161.173.60]) by smtp.gmail.com with ESMTPSA id 91sm1927177wre.41.2017.10.25.02.55.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 02:55:18 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 25 Oct 2017 10:55:11 +0100 Message-Id: <20171025095511.25751-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [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: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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)