From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (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 B79232095D8CE for ; Thu, 13 Jul 2017 05:47:08 -0700 (PDT) Received: by mail-wr0-x22b.google.com with SMTP id y28so800646wrd.3 for ; Thu, 13 Jul 2017 05:48:57 -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=94YaIZ/DSLBVXhiM+iV5ok9+A3bRNJxMB157p5sqGUk=; b=ecwjRl3zsVU5+ncIbwthMXqUGdCr/qk3Q4bq8V3L9p9OU2IWztMRHvl7PqiBO96/HC EedOc6AUx8zmgwk6sUoQ0PRs/NlJ0eWWzVrG6clL7aRwAL+vH7TNORI73odetCVb3pst 9AKyVtxqtwtkLTt0nXjiQ/0CWagL68zf9zjx8= 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=94YaIZ/DSLBVXhiM+iV5ok9+A3bRNJxMB157p5sqGUk=; b=YsSTkxWcBgiVse4V12sCtTHAgqBEpdPZU9SIgRO30FPCmtUsJcSstS7hZMLTMUViv/ ti6yOxEvTqdVKcRdAf7vo6vgt6+hAlUZyFxISudNgfkBwGX4oVaAokJTaOmPeRuQJWCW 02J6j+WFc7OfzAKy1WtCnk3N4xOqeAyNAZtG/2I0sfIxqJeK6mtvDzlNeayvcge4BB77 XYWKnzxZ4u0zB/6gwSVJxmWo4eMTio6daRLxif3V5FTL05olCod7wQC6uGzKwpCzsVjh d88szo0DlzWMj9RGbX32W8kEJo9n7H8DNHGbKgoC2irUnrKCtFTDCD5XIrPG2F35lGPR tD5g== X-Gm-Message-State: AIVw111UayALGbqIdSKH0qDVDJNLdd6zwVFTBjTtmWMdbiPJzRRHfPPu N8yhTEZdFs1XJFWcuGYqkg== X-Received: by 10.223.142.202 with SMTP id q68mr1461238wrb.13.1499950134828; Thu, 13 Jul 2017 05:48:54 -0700 (PDT) Received: from localhost.localdomain ([154.145.198.181]) by smtp.gmail.com with ESMTPSA id 52sm5420720wra.56.2017.07.13.05.48.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 05:48:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, liming.gao@intel.com, yonghong.zhu@intel.com Cc: Alexei.Fedorov@arm.com, leif.lindholm@linaro.org, evan.lloyd@arm.com, Ard Biesheuvel Date: Thu, 13 Jul 2017 13:48:43 +0100 Message-Id: <20170713124844.23556-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [PATCH 1/2] BaseTools/tools_def AARCH64: mark register x18 as reserved 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, 13 Jul 2017 12:47:09 -0000 The AArch64 ABI classifies register x18 as a platform register, which means it should not be used unless the code is guaranteed to run on a platform that doesn't use it in such a capacity. GCC does not honour this requirement by default, and so we need to tell it not to touch it explicitly, by passing the -ffixed-x18 command line option. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=625 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- 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 7d3f54218461..128da5131d01 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4341,7 +4341,7 @@ DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-ad DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access -DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie +DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie -ffixed-x18 DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds -- 2.9.3