From: "Gao, Liming" <liming.gao@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well
Date: Fri, 12 Aug 2016 03:27:16 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EA890@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1470914055-28034-1-git-send-email-ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ard Biesheuvel
> Sent: Thursday, August 11, 2016 7:14 PM
> To: edk2-devel@lists.01.org; leif.lindholm@linaro.org; Gao, Liming
> <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Subject: [edk2] [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker
> for XIP modules as well
>
> Commit 478f50990a ("BaseTools GCC: add the compiler flags to the linker
> command line") added the compiler flags to the linker command line,
> which is required for LTO to function correctly, since it involves code
> generation at link time.
>
> This patch failed to update the build rules for XIP modules on AARCH64,
> which not only requires the ordinary CC flags but also the XIP CC flags
> to prevent the LTO backend to, e.g., emit code that does not adhere to
> the strict alignment rules we impose for code that may execute with the
> MMU off.
>
> So update the XIP link rules as well. Since AARCH64 and ARM are not
> supported by any toolchains in the GCCLD build rule family, drop the
> reference to GCCLD while we're at it.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> BaseTools/Conf/build_rule.template | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/BaseTools/Conf/build_rule.template
> b/BaseTools/Conf/build_rule.template
> index 6191957e0e70..7e2c6a96583d 100755
> --- a/BaseTools/Conf/build_rule.template
> +++ b/BaseTools/Conf/build_rule.template
> @@ -310,7 +310,7 @@
> "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist
> $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
>
>
> -[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64,
> Static-Library-File.PEIM.AARCH64]
> +[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64,
> Static-Library-File.PEIM.AARCH64,Static-Library-File.SEC.ARM, Static-Library-
> File.PEI_CORE.ARM, Static-Library-File.PEIM.ARM]
> <InputFile>
> *.lib
>
> @@ -320,8 +320,8 @@
> <OutputFile>
> $(DEBUG_DIR)(+)$(MODULE_NAME).dll
>
> - <Command.GCC, Command.GCCLD>
> - "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-
> group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
> + <Command.GCC>
> + "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-
> group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS)
> $(CC_XIPFLAGS) $(DLINK2_FLAGS)
> "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
>
>
> --
> 2.7.4
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2016-08-12 3:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 11:14 [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well Ard Biesheuvel
2016-08-11 11:14 ` [PATCH 2/2] BaseTools ARM AARCH64: drop redundant compiler arguments Ard Biesheuvel
2016-08-11 12:18 ` Leif Lindholm
2016-08-12 3:27 ` Gao, Liming
2016-08-11 12:18 ` [PATCH 1/2] BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well Leif Lindholm
2016-08-12 3:27 ` Gao, Liming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A1155EA890@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox