From f1dde847461be81f72fe8aaa39b492f0c6ddc4e5 Mon Sep 17 00:00:00 2001
From: Olivier Martin <olivier.martin@arm.com>
Date: Tue, 6 May 2014 16:04:44 +0100
Subject: [PATCH] MdePkg: use GCC_ASM_EXPORT to export functions

This ensures the .type directive is used to mark them as function symbols

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
---
 MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S     | 2 +-
 MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S        | 2 +-
 MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.S      | 2 +-
 MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S  | 2 +-
 MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S   | 2 +-
 MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S | 2 +-
 MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S    | 4 ++--
 MdePkg/Library/BaseLib/AArch64/SwitchStack.S        | 4 ++--
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
index 8e12bdd..ea01a5d 100644
--- a/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
+++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuFlushTlb.S
@@ -17,7 +17,7 @@
 
 .text
 .p2align 2
-ASM_GLOBAL ASM_PFX(CpuFlushTlb)
+GCC_ASM_EXPORT(CpuFlushTlb)
 
 #/**
 #  Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
diff --git a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
index 86c3e63..316ac65 100644
--- a/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
+++ b/MdePkg/Library/BaseCpuLib/AArch64/CpuSleep.S
@@ -17,7 +17,7 @@
 
 .text
 .align 3
-ASM_GLOBAL ASM_PFX(CpuSleep)
+GCC_ASM_EXPORT(CpuSleep)
 
 #/**
 #  Places the CPU in a sleep state until an interrupt is received.
diff --git a/MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.S b/MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.S
index df89abe..29b6669 100644
--- a/MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.S
+++ b/MdePkg/Library/BaseLib/AArch64/CpuBreakpoint.S
@@ -17,7 +17,7 @@
 
 .text
 .p2align 2
-ASM_GLOBAL ASM_PFX(CpuBreakpoint)
+GCC_ASM_EXPORT(CpuBreakpoint)
 
 #/**
 #  Generates a breakpoint on the CPU.
diff --git a/MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S b/MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S
index b80a7b4..943cc44 100644
--- a/MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S
@@ -17,7 +17,7 @@
 
 .text
 .p2align 2
-ASM_GLOBAL ASM_PFX(DisableInterrupts)
+GCC_ASM_EXPORT(DisableInterrupts)
 
 #/**
 #  Disables CPU interrupts.
diff --git a/MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S b/MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S
index 289739c..a423102 100644
--- a/MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S
+++ b/MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S
@@ -17,7 +17,7 @@
 
 .text
 .p2align 2
-ASM_GLOBAL ASM_PFX(EnableInterrupts)
+GCC_ASM_EXPORT(EnableInterrupts)
 
 
 #/**
diff --git a/MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S b/MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S
index 5a971f5..037f59a 100644
--- a/MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S
+++ b/MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S
@@ -17,7 +17,7 @@
 
 .text
 .p2align 2
-ASM_GLOBAL ASM_PFX(GetInterruptState)
+GCC_ASM_EXPORT(GetInterruptState)
 
 #/**
 #  Retrieves the current CPU interrupt state.
diff --git a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S
index dbc5adb..704996d 100644
--- a/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S
+++ b/MdePkg/Library/BaseLib/AArch64/SetJumpLongJump.S
@@ -13,8 +13,8 @@
 .text
 .p2align 3
 
-ASM_GLOBAL ASM_PFX(SetJump)
-ASM_GLOBAL ASM_PFX(InternalLongJump)
+GCC_ASM_EXPORT(SetJump)
+GCC_ASM_EXPORT(InternalLongJump)
 
 #define GPR_LAYOUT                         \
         REG_PAIR (x19, x20,  0);           \
diff --git a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
index 207a569..2bce9c9 100644
--- a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
+++ b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
@@ -16,8 +16,8 @@
 .text
 .align 5
 
-ASM_GLOBAL ASM_PFX(InternalSwitchStackAsm)
-ASM_GLOBAL ASM_PFX(CpuPause)
+GCC_ASM_EXPORT(InternalSwitchStackAsm)
+GCC_ASM_EXPORT(CpuPause)
 
 /**
 //
-- 
1.8.5

