From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (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 A197F2035A7A5 for ; Thu, 16 Nov 2017 06:44:13 -0800 (PST) Received: by mail-io0-x241.google.com with SMTP id 71so5468653ior.7 for ; Thu, 16 Nov 2017 06:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5Mf8+AzMylAlQynhCAkrJwCqj549bknRCaoVd8Mo1J8=; b=F1jKt4TueekhoBhxZ0TmH/D8IqbuBJ877RcUe3JeUv/hxmU8tiHW8H/hAQanSusFVt b3kpRqiQiiTqLQdJbUCUKNCFH9WMSj+M5I1oBB06QQLd6Fi4vels3/uXPjGX5ra1wuqE Dpi/g2WispYS+6KrrBOkKq6Yp1EzuJBoSdkc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5Mf8+AzMylAlQynhCAkrJwCqj549bknRCaoVd8Mo1J8=; b=q6nZLO8noJQlFiKhhZdtf7nqlu4dJGbTyUObBGEnxaKokO1V3LPVX2mbCOrvND0Vv5 Kvald1uHizW+erizgjhdTyXHvPytlZSaQ5BvWr3Vq5EwrBzm8BwYzXniPtoNH5SbeZdQ YTzqbHYi4PHw5ZI4GYJ22XY8D1+gb7qApK2FeY69TsadOzYfC7Eh16iM1OWPOqGGfuwv SmANtXyGgBgm9ij9Uo6CBPdNX1RGjFRY6oVNgBh3ahWd9DsIO9eGW63JbOSIZluuMbrd I5l0tgWcHw++w5h/6hrek24BensT0RhuIVrsYFUj/BctZm8kg/bB/dspr2TQVXuqfBXn L2mw== X-Gm-Message-State: AJaThX5sWI6YrI5IjiHDRPwzGvi0bFrT9gxB7Kt1wHQzXbwVQTXrQWdq H2T2uzDwBTgDVPehnRx8QjeEUOkKnu1gDmSjTzfdaoMlmzA= X-Google-Smtp-Source: AGs4zMawOoO7j4bY3FdajduIx0k5Ama6nWboErvkGN/yebuir+BhqO3s5yoQUdS3xMK0FwobQBZGrbjTzQUiF13kLKo= X-Received: by 10.107.82.6 with SMTP id g6mr1798524iob.253.1510843702600; Thu, 16 Nov 2017 06:48:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Thu, 16 Nov 2017 06:48:22 -0800 (PST) In-Reply-To: References: <20171101150125.13679-1-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A14E176A26@SHSMSX104.ccr.corp.intel.com> From: Ard Biesheuvel Date: Thu, 16 Nov 2017 14:48:22 +0000 Message-ID: To: Marcin Wojtas Cc: "Gao, Liming" , "edk2-devel@lists.01.org" , "daniel.thompson@linaro.org" , "leif.lindholm@linaro.org" Subject: Re: [PATCH] BaseTools/tools_def AARCH64 ARM: disable PIE linking for .aslc sources 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, 16 Nov 2017 14:44:13 -0000 Content-Type: text/plain; charset="UTF-8" On 16 November 2017 at 14:38, Marcin Wojtas wrote: > Hi Ard, > > With both PIE disabling patches for AARCH64, when compiling ACPI tables with > gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- > I get following errors: > [...] > aarch64-linux-gnu-gcc: error: unrecognized command line option '-no-pie' > Do I understand correctly, that I should either revert those patches > or upgrade to the newer toolchain? > Ugh. I thought GCC 5 and later implemented -no-pie, but apparently not. Does this fix your build? I will need to check whether it fixes the original issue, but hopefully your toolchain doesn't choke on this: diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index aebd7d558633..111fe8da7773 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4496,10 +4496,10 @@ 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) -no-pie DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) -Wno-error -DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -no-pie +DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -Wl,-no-pie DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) -no-pie -DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -no-pie +DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -Wl,-no-pie #################################################################################### # > > 2017-11-01 16:18 GMT+01:00 Ard Biesheuvel : >> On 1 November 2017 at 15:13, Gao, Liming wrote: >>> Reviewed-by: Liming Gao >>> >> >> Thanks - pushed as 3380a591232de2ab3007ab051010a67c3d000d1c >> >>>> -----Original Message----- >>>> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >>>> Sent: Wednesday, November 1, 2017 11:01 PM >>>> To: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Gao, Liming ; Zhu, Yonghong >>>> >>>> Cc: daniel.thompson@linaro.org; Ard Biesheuvel >>>> Subject: [PATCH] BaseTools/tools_def AARCH64 ARM: disable PIE linking for .aslc sources >>>> >>>> Commit 1894a7c64c0a ("BaseTools/tools_def AARCH64 ARM: disable PIE >>>> linking") works around an issue that was caught due to the fact that >>>> PIE linking produces broken .acpi files. However, v2 of that fix >>>> inadvertently only applied the workaround to the normal linker command >>>> line, and not to the ASLD one, so the issue still persists. >>>> >>>> So add the missing -no-pie options for ASLD on ARM and AARCH64. >>>> >>>> Contributed-under: TianoCore Contribution Agreement 1.1 >>>> Signed-off-by: Ard Biesheuvel >>>> --- >>>> BaseTools/Conf/tools_def.template | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template >>>> index 98df0ffc9294..aebd7d558633 100755 >>>> --- a/BaseTools/Conf/tools_def.template >>>> +++ b/BaseTools/Conf/tools_def.template >>>> @@ -4498,8 +4498,8 @@ 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) -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) >>>> +DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) -no-pie >>>> +DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -no-pie >>>> >>>> #################################################################################### >>>> # >>>> -- >>>> 2.11.0 >>> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel