From patchwork Mon Dec 10 14:13:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 153286 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3694150ljp; Mon, 10 Dec 2018 07:37:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VmhM8IVVT0RIuGTP/VQzHDX4PDWXGqAGMnoYQlGTLulwHtLaHEYB4MKl3Hg8EZpyqwmq4S X-Received: by 2002:a62:d448:: with SMTP id u8mr12779374pfl.105.1544456253925; Mon, 10 Dec 2018 07:37:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544456253; cv=none; d=google.com; s=arc-20160816; b=MmOcD1QFRIssoaZ7ZoMTlSpcMH6Oj3S0pAsV02ApIli84KwmfM4hno4D5lnTt9tb3H sahAfxRGWUxUaZT8PBZJ66fpg0qBqNSHUQsHnvZGAhtPL6bBiWI/Vq1WZupn18Z2bUC2 4UAYf9d4fBY4/sa4SJ9Pqr981BZVUkX4NjxF5EISXAepF75jJyd5NdQlbVB6/VzEc0JF He3CV1r0xa1pBLTX2aIAHDdtvEsN079Bx1EFi6HJNjw/P7LTnBZGLCjmVmq7KQf0OEbl KcvXGbTj2QK7OSR1d0mqdw/Zn056RQWa3ZrnpaTBM6uh+i+aZAietQ5uoEqAXNPY4BDf K19Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=zC9MqGSj0A9b2EFUGLKDqtvvQLt0qDPzX6oYry63oLU=; b=EbxxN8dDgWjnFq7RdDP1QxjKV7Fm9OhBwje3DR3nRNOSTbaH0Td8MGoNSndTS+HApe rGjmro30BNn6uSWCa8l+C5gw9b10lwoFBuO5UCvqqMZzBCznWelVkgLf6TpzPKO9anI3 c2W4ErU/PZg6n9X9nQQzIMcmMegD5XA+7DK15uMWhhsuQxuC4prpb5KTW3n6k7DjiZxA mSPBRaJeEMsVfERpUn9+cq2lKlhwZxddg1DHSRb+TzK/EROoibv+Kw4rqyOjzwJNWfTK 5IPlkDl8QSycFhFx0yMnv5CuFKSHUHFAT+XHyE4yTvQKniubgffpaT7qIRfxNlilLiLQ kbhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DM3jFhvq; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id g10si9906255pll.428.2018.12.10.07.37.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 07:37:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DM3jFhvq; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 461D72119BAE3; Mon, 10 Dec 2018 07:37:20 -0800 (PST) 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:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 17AB62119AC12 for ; Mon, 10 Dec 2018 06:13:45 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id 96so10654364wrb.2 for ; Mon, 10 Dec 2018 06:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HvnVF5SOxuyEcepneijKz09usPN1z+bGm5MvEJ5eJ70=; b=DM3jFhvqkJl6dU6kBjxoIOROIkxe0ZMJ4M5ALmYwAu6XZlwkBeSiSWISJbTLnwguYG D2kme4d45xI0lyO0Mp5vi7QkATdMbfVQgdR2056VGX+Rx7++Xll2Qp8Ou1Efc0PVsJFz FrUny/tQ8lFr2yWjmvTpU6rmYFjLSk91sIX+A= 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:mime-version :content-transfer-encoding; bh=HvnVF5SOxuyEcepneijKz09usPN1z+bGm5MvEJ5eJ70=; b=GH/nQ8CyiTPHt1XqXRBISCbhuC/MliMa6QFE0Dds8dO3Y5JnmVWNRzSxCL+8fOaVJY ROl+eG9sKrHNsqQE+r18Mup6Vz1sdQbuwM4xaGGT8GcMw+i5UIJr3GdciZs6T52diTYD Ef6ZTl/YJkdVQuE3Wt1dnmMMB8NDmjpYlgZnpr0XG8K4D/mrfYwDELS26+wccU5idVhk zYAJRZtSDQduvTTEzTKZ3PPp8PTPyu90DWtwAJjon0hRSHy2B2g2zGoPKnRScgcU1hJF JE98DLm/jEnNGxH+aSz2Zu4YOUAbDeSKgIx7VouqJgn6StCTFWoPhaqgWAizbEjPcoLu 4N+A== X-Gm-Message-State: AA+aEWbC7hXlCvFTxwA9aekZtK1/OBRIpA0E5gvFAcoJCeuVQWYr6lsJ 25y7ClE4zdIl6xu/qhN3WLV8wi0Q26/hVg== X-Received: by 2002:adf:82e4:: with SMTP id 91mr10472730wrc.131.1544451223660; Mon, 10 Dec 2018 06:13:43 -0800 (PST) Received: from localhost.localdomain (astlambert-681-1-52-199.w90-86.abo.wanadoo.fr. [90.86.17.199]) by smtp.gmail.com with ESMTPSA id p74sm14210364wmd.29.2018.12.10.06.13.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 06:13:42 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 10 Dec 2018 15:13:39 +0100 Message-Id: <20181210141339.17108-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [edk2] [PATCH] BaseTools/tools_def AARCH64: move GCC49/GGC5 to 4 KB section alignment X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liming.gao@intel.com Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Since 4 KB section alignment is required when mapping PE/COFF images with strict permissions, update the default section alignment when using GCC49 and GCC5 in RELEASE mode. Note that XIP modules such as SEC, PEIMs or PEI core are not affected by this change, since the override to 32 byte aligment remains in effect. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BaseTools/Conf/tools_def.template | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm Tested-by: Leif Lindholm diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index e0e68fd7fb49..5d34333dc54f 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4263,11 +4263,11 @@ DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS) DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS) DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) DEFINE GCC49_ARM_CC_XIPFLAGS = DEF(GCC48_ARM_CC_XIPFLAGS) -DEFINE GCC49_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS) +DEFINE GCC49_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC44_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS) -mcmodel=small DEFINE GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS) DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS) DEFINE GCC49_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS) -DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS) +DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 DEFINE GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS) DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS) DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS) @@ -5034,15 +5034,16 @@ RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v *_GCC49_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS) - DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0 -mcmodel=small - DEBUG_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 + DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0 + DEBUG_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) DEBUG_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny +RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) +RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 - NOOPT_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0 -mcmodel=small - NOOPT_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -O0 + NOOPT_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0 + NOOPT_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0 NOOPT_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0 #################################################################################### @@ -5189,14 +5190,15 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS *_GCC5_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS) - DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=small - DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch -mcmodel=small + DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable + DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny +RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch +RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 - NOOPT_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 -mcmodel=small + NOOPT_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 NOOPT_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -O0 NOOPT_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0