Disallow potentially unaligned data accesses.
Unaligned accesses are complicated. Some architectures don't allow them
at all, some optionally don't allow it and others split it into multiple
accesses for a single instruction. Accesses the straddle a page boundary
may fault for one part but not another adding to the complications. This
would add complexity to any ISA level proofs too.
ATF boots into a mode with unaligned accesses generating exceptions so
we need to turn it off to get running on the FVP.
Bug: 117551008
Change-Id: I42ebf0feb9b99db96e03c5e01b879f2500776aa5
diff --git a/build/BUILD.gn b/build/BUILD.gn
index ef0cf9f..9a6eaf2 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -57,6 +57,7 @@
cflags += [
"-mcpu=${arch_cpu}",
+ "-mstrict-align",
"-fno-stack-protector",
"-fno-builtin",
"-ffreestanding",