Ard: Could we add this option in AARCH64_CC_FLAGS if it has no impact to DXE driver? If yes, you only need to change tools_def.template, no change is required to build_rule.template.
Thanks Liming -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Ard Biesheuvel Sent: Monday, January 04, 2016 5:53 PM To: [email protected]; Gao, Liming; [email protected]; [email protected]; Zhu, Yonghong Cc: Ard Biesheuvel Subject: [edk2] [PATCH 0/2] BaseTools AARCH64: build XIP modules with strict alignment On AARCH64, before we turn on the MMU, unaligned accesses are not allowed. Since the idiom recognition employed by GCC may turn allowable sequences into sequences that result in such unaligned accesses (i.e., a sequence of byte wide loads in reverse order may be turned into a wider load and a rev instruction of the compiler thinks unaligned accesses are allowed), we have to make sure that any code that may execute before the MMU is enabled is built with -mstrict-align. Since this aligns with the notion of XIP we have in EDK2, let's add a build rule that allows XIP specific CC option overrides to be set, and use it to set the -mstrict-align CC flag for BASE, SEC, PEI_CORE and PEIM modules. (XIPFLAGS has been suggest by Andrew Fish a couple of months ago, when a similar issue came up) Ard Biesheuvel (2): BaseTools: add separate build rule for modules that may execute in place BaseTools AARCH64: build XIP modules with strict alignment BaseTools/Conf/build_rule.template | 26 ++++++++++++++++++++ BaseTools/Conf/tools_def.template | 9 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) -- 2.5.0 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

