From patchwork Wed Oct 25 20:08:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117156 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1230591qgn; Wed, 25 Oct 2017 13:08:18 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TQxNSmkL8jgEgd3Sh0TnWgkyrvXNNpTwWAlNJvW6kpDBGbH7cfPhsww5QptdB1vBYhMPZY X-Received: by 10.101.87.193 with SMTP id q1mr2987760pgr.370.1508962098411; Wed, 25 Oct 2017 13:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508962098; cv=none; d=google.com; s=arc-20160816; b=HcPXqRvCFqsNd2yIHGy//PMCuGdRe0oW6dw10z9WL2JO2NKTFYfxa9rGMF7W8wTjsh bq0cIIOJS+Y1adRvmIiKrIeqpCd7h1YNn51nCY2HMMnvU7sY2ycUWFMmgng/WGeVNzKW 8bN6MW4G1NToBssRBM+i8WRgtJ7XwnDlKzn+4nl1ZER+8kv5a79/wpqW8txwCqG1MN5N 9fqAqlUpI9Huew0JE6hj0xXmKjGNFxro2hKP8mw/zc5B7oqgbfFnnHsq/2EvKEeyprb4 ikPhKZWr6BEcNWTUhP3hFvO7R7OsO63P6a//732YgR5kQ2EyU6DO5c9/sxRFA8OsW1Mx QO7A== 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=z+xo69Xdk+91YY9nTsHjbCxbNvVMKnRPr5ZPmEnuOG0=; b=zno3MkYDQ7fZjCYAyOFLSn0R2iCfnyVATsvofRoGn7K2pszNZo5ishyeg0VcR+SZBV 4/v6pgYvokZZxRgHiclTrGgiHTNuJ+y1J6kuwmYR128tbjKdlw+Yqf5qE9CUr/iDCuck sXUTvqLJbuC347gYp0I/yR5iolMSaHb0ZvTvv4ncHcxhFBUNGQ5u6GQmn7WlQjtROu9u Y8EE5Q1t00V4oEdWZQmyh4WxxnpmUDfsYf+1Q1soKGP/iPYfnyokbjVL/KAnYBnUxjgr w/Yt7E0dCeSuiF55wUPSrXB7fBf3D5ESAtl/+bdI1zT6tOc0wA5kFthzgsu/Dwh96FuW /0jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TvDRWtPP; 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 p4si2256920pgc.42.2017.10.25.13.08.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 13:08:18 -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=TvDRWtPP; 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 040B42034CF65; Wed, 25 Oct 2017 13:04:32 -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:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 553A32034C085 for ; Wed, 25 Oct 2017 13:04:31 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id y39so1158236wrd.4 for ; Wed, 25 Oct 2017 13:08:16 -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=qs/zxgvgDXCEaCTlMoreC6xg1Gryi9BCBJkNkQ7Fow4=; b=TvDRWtPPoXFCzBoSSjj8DS7cwjv11dyFXb5kNAunaP1aDegj4YjWCOMZiErkOPi7Zo SjzrLOFuoIMtkau9vSO/c1lLq+aHR+BxBB1l3FJtWRgVSdxxW1QGvN4d6IDYP3Dhj7fq QlSIj0Urciyz3LSebP4gY/euxjfgIdPtqEuw4= 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=qs/zxgvgDXCEaCTlMoreC6xg1Gryi9BCBJkNkQ7Fow4=; b=HGjIhmXVI8PORZFBZRr0Froj8W4jJPWjzaJ2GNDdNn2qNidQjTM6cQgs/71CrjMfCY FRsBAJiWj1Bb3pNy8irkbghsiKYSCpq4aNBLRfRv8rv900Dy2KZm/BK4L60RdyN3SK8+ hynupKpB+e5MsE7xjswKAtR5wAvb9PG40xodDS9V2nCUXbCaWrEen+OHwKotkfmXzXi7 xIUJnVtnBVESKv7OE9plHkPUGjY9Xy4leNRyStEsoil3iPNys8keEv2ZaTjISUg8HNeQ NQVESbEA/xFFn7qQSv9O2gd6cGtb8DNBvdLIDgYIEH8ET361dt9f3rFh+LHg+F4e0Lh/ W5vA== X-Gm-Message-State: AMCzsaXnrkGlbCRzzzXnQt2bkyII6cIv11u3qai90YtwSEOR1PHSXuHo vG58blqx9QfefmvPe3sinUodJ29v5TYNng== X-Received: by 10.223.156.138 with SMTP id d10mr3329126wre.214.1508962094278; Wed, 25 Oct 2017 13:08:14 -0700 (PDT) Received: from localhost.localdomain ([160.171.245.11]) by smtp.gmail.com with ESMTPSA id r23sm3034810wrc.93.2017.10.25.13.08.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 13:08:13 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Wed, 25 Oct 2017 21:08:05 +0100 Message-Id: <20171025200805.1443-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH v2] BaseTools/tools_def AARCH64 ARM: 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 or ARM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- v2: - apply to both AARCH64 and ARM - apply to GCC5 (and up) only - older versions of GCC don't support this option BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Liming Gao diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index e93c2a0bf1ef..df7c109438fd 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4494,9 +4494,9 @@ DEFINE GCC5_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) DEFINE GCC5_ARM_CC_XIPFLAGS = DEF(GCC49_ARM_CC_XIPFLAGS) DEFINE GCC5_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) DEFINE GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS) -DEFINE GCC5_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS) +DEFINE GCC5_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS) -no-pie DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) -Wno-error -DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) +DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -no-pie DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)