Annotate functions with ASM_FUNC() so that they are emitted into
separate sections.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
---
 ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S | 8 +++-----
 ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S  | 9 +++------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S 
b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
index 0a6e039af9dc..69de4c1fd48e 100644
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S
@@ -17,6 +17,8 @@
 #
 #------------------------------------------------------------------------------
 
+#include <AsmMacroIoLib.h>
+
 /**
   Copy Length bytes from Source to Destination. Overlap is OK.
 
@@ -37,11 +39,7 @@ InternalMemCopyMem (
   IN      UINTN                     Length
   )
 **/
-.text
-.align 2
-GCC_ASM_EXPORT(InternalMemCopyMem)
-
-ASM_PFX(InternalMemCopyMem):
+ASM_FUNC(InternalMemCopyMem)
   stmfd  sp!, {r4, r9, lr}
   tst  r0, #3
   mov  r4, r0
diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S 
b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
index 6a6bb20ec14f..28ba38b79c6a 100644
--- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
+++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S
@@ -17,6 +17,8 @@
 #
 #------------------------------------------------------------------------------
 
+#include <AsmMacroIoLib.h>
+
 /**
   Set Buffer to Value for Size bytes.
 
@@ -34,12 +36,7 @@ InternalMemSetMem (
   IN      UINT8                     Value
   )
 **/
-
-.text
-.align 2
-GCC_ASM_EXPORT(InternalMemSetMem)
-
-ASM_PFX(InternalMemSetMem):
+ASM_FUNC(InternalMemSetMem)
   stmfd  sp!, {r4-r7, lr}
   tst    r0, #3
   movne  r3, #0
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to