diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-13 18:25:14 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-21 08:53:24 +0100 |
commit | 493b40451d4f841c14f9ee35da1492084baa8d9b (patch) | |
tree | cba51490dc5b0615f2578b845d746be73990f294 | |
parent | 3c3cf1cd731f5aa8fdc00392cbf7c5e36055bf18 (diff) | |
download | edk2-platforms-493b40451d4f841c14f9ee35da1492084baa8d9b.tar.xz |
ArmPkg/AsmMacroIoLib: force word alignment for functions
Without an explicit .align directive, the Clang assembler defaults to
no alignment, which may result in instructions appearing misaligned in
the final executable. So use word alignment in all cases.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r-- | ArmPkg/Include/AsmMacroIoLib.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h index fb73ea9a46..936e01e338 100644 --- a/ArmPkg/Include/AsmMacroIoLib.h +++ b/ArmPkg/Include/AsmMacroIoLib.h @@ -56,6 +56,7 @@ .global Name ; \
.section #Section, "ax" ; \
.type Name, %function ; \
+ .p2align 2 ; \
Name:
#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
|