summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S4
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S20
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ipf/AsmFuncs.s20
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S20
-rw-r--r--MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S10
-rw-r--r--MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.S2
-rw-r--r--MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.S2
-rw-r--r--MdePkg/Library/BaseCpuLib/Ipf/CpuFlushTlb.s2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ARShiftU64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuId.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuIdEx.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuPause.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisableCache.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisablePaging32.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableCache.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnablePaging32.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnablePaging64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxRestore.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxSave.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Invd.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LRotU64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LShiftU64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LongJump.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ModU64x32.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Monitor.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x32.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Mwait.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RRotU64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RShiftU64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr1.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr5.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr6.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr7.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEflags.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadFs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadIdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadLdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm1.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm5.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm6.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm7.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMsr64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadPmc.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadSs.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTsc.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/SetJump.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/SwapBytes64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Thunk16.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Wbinvd.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr1.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr5.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr6.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr7.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteGdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteIdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteLdtr.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm0.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm1.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm2.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm3.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm4.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm5.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm6.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm7.S2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMsr64.S2
-rw-r--r--MdePkg/Library/BaseLib/Ipf/SetJmp.s2
-rw-r--r--MdePkg/Library/BaseLib/X64/DisableCache.S2
-rw-r--r--MdePkg/Library/BaseLib/X64/EnableCache.S2
-rw-r--r--MdePkg/Library/BaseLib/X64/Thunk16.S32
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S2
-rw-r--r--MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S2
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.S2
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.S2
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.S2
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.S2
-rw-r--r--UnixPkg/Sec/Stack.S2
219 files changed, 267 insertions, 267 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S b/MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S
index a152b5033c..cf39bd6eb2 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S
+++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S
@@ -18,8 +18,8 @@
.align 8
- .globl ASM_PFX(AsmGetVectorTemplatInfo)
- .globl ASM_PFX(AsmVectorFixup)
+ ASM_GLOBAL ASM_PFX(AsmGetVectorTemplatInfo)
+ ASM_GLOBAL ASM_PFX(AsmVectorFixup)
/*
;
;-----------------------------------------------------------------------
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
index 03fc6c98ba..671c8dbdf3 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
@@ -12,11 +12,11 @@
#
#**/
-.globl ASM_PFX(OrigVector)
-.globl ASM_PFX(InterruptEntryStub)
-.globl ASM_PFX(StubSize)
-.globl ASM_PFX(CommonIdtEntry)
-.globl ASM_PFX(FxStorSupport)
+ASM_GLOBAL ASM_PFX(OrigVector)
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)
+ASM_GLOBAL ASM_PFX(StubSize)
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)
+ASM_GLOBAL ASM_PFX(FxStorSupport)
ASM_PFX(StubSize): .long ASM_PFX(InterruptEntryStubEnd) - ASM_PFX(InterruptEntryStub)
ASM_PFX(AppEsp): .long 0x11111111 # ?
@@ -34,7 +34,7 @@ ASM_PFX(OrigVector): .long 0x66666666 # ?
#
# Abstract: Returns TRUE if FxStor instructions are supported
#
-.globl ASM_PFX(FxStorSupport)
+ASM_GLOBAL ASM_PFX(FxStorSupport)
ASM_PFX(FxStorSupport):
#
# cpuid corrupts ebx which must be preserved per the C calling convention
@@ -57,7 +57,7 @@ ASM_PFX(FxStorSupport):
# Abstract: Encodes an IDT descriptor with the given physical address
#
-.globl ASM_PFX(Vect2Desc)
+ASM_GLOBAL ASM_PFX(Vect2Desc)
ASM_PFX(Vect2Desc):
push %ebp
mov %esp,%ebp
@@ -71,13 +71,13 @@ ASM_PFX(Vect2Desc):
leave
ret
-.globl ASM_PFX(InterruptEntryStub)
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)
ASM_PFX(InterruptEntryStub):
mov %esp,0x0 # save stack top
mov $0x0,%esp # switch to debugger stack
push $0x0 # push vector number - will be modified before installed
jmp ASM_PFX(CommonIdtEntry) # jump CommonIdtEntry
-.globl ASM_PFX(InterruptEntryStubEnd)
+ASM_GLOBAL ASM_PFX(InterruptEntryStubEnd)
ASM_PFX(InterruptEntryStubEnd):
#------------------------------------------------------------------------------
@@ -86,7 +86,7 @@ ASM_PFX(InterruptEntryStubEnd):
# Abstract: This code is not a function, but is the common part for all IDT
# vectors.
#
-.globl ASM_PFX(CommonIdtEntry)
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)
ASM_PFX(CommonIdtEntry):
##
## At this point, the stub has saved the current application stack esp into AppEsp
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ipf/AsmFuncs.s b/MdeModulePkg/Universal/DebugSupportDxe/Ipf/AsmFuncs.s
index aa497707c4..fc744c9268 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ipf/AsmFuncs.s
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ipf/AsmFuncs.s
@@ -16,10 +16,10 @@
#include "Common.i"
#include "Ds64Macros.i"
-.globl PatchSaveBuffer
-.globl IpfContextBuf
-.globl CommonHandler
-.globl ExternalInterruptCount
+ASM_GLOBAL PatchSaveBuffer
+ASM_GLOBAL IpfContextBuf
+ASM_GLOBAL CommonHandler
+ASM_GLOBAL ExternalInterruptCount
/////////////////////////////////////////////
@@ -30,7 +30,7 @@
// Description:
// Flushes instruction cache for specified number of bytes
//
- .globl InstructionCacheFlush
+ ASM_GLOBAL InstructionCacheFlush
.proc InstructionCacheFlush
.align 32
InstructionCacheFlush::
@@ -158,7 +158,7 @@ LoopBack: // $L143:
// Notes:
//
//
- .globl ChainHandler
+ ASM_GLOBAL ChainHandler
.proc ChainHandler
ChainHandler:
@@ -233,7 +233,7 @@ ChainHandlerDone:
// Notes:
//
//
- .globl UnchainHandler
+ ASM_GLOBAL UnchainHandler
.proc UnchainHandler
UnchainHandler:
@@ -666,7 +666,7 @@ SetSlotDone:
// Returns:
// Current value if IVA
- .globl GetIva
+ ASM_GLOBAL GetIva
.proc GetIva
GetIva:
mov r8=cr2;;
@@ -686,7 +686,7 @@ GetIva:
// Returns:
// Previous state of psr.ic
//
- .globl ProgramInterruptFlags
+ ASM_GLOBAL ProgramInterruptFlags
.proc ProgramInterruptFlags
ProgramInterruptFlags:
alloc loc0=1,2,0,0;;
@@ -1272,7 +1272,7 @@ EndHookHandler:
// Saves IVT index to SCRATCH_REG1 (immediate value is fixed up when code is copied
// to the IVT entry.
- .globl HookStub
+ ASM_GLOBAL HookStub
.proc HookStub
HookStub:
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
index 7c854c1c88..44efd231fb 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
@@ -14,11 +14,11 @@
.intel_syntax noprefix
-.globl ASM_PFX(OrigVector)
-.globl ASM_PFX(InterruptEntryStub)
-.globl ASM_PFX(StubSize)
-.globl ASM_PFX(CommonIdtEntry)
-.globl ASM_PFX(FxStorSupport)
+ASM_GLOBAL ASM_PFX(OrigVector)
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)
+ASM_GLOBAL ASM_PFX(StubSize)
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)
+ASM_GLOBAL ASM_PFX(FxStorSupport)
.data
@@ -94,7 +94,7 @@ DebugStackBegin : .ascii "<<<< DbgStkBegin" # initial debug ESP == DebugSta
#
# Abstract: Returns TRUE if FxStor instructions are supported
#
-.globl ASM_PFX(FxStorSupport)
+ASM_GLOBAL ASM_PFX(FxStorSupport)
ASM_PFX(FxStorSupport):
#
# cpuid corrupts rbx which must be preserved per the C calling convention
@@ -116,7 +116,7 @@ ASM_PFX(FxStorSupport):
#
# Abstract: Encodes an IDT descriptor with the given physical address
#
-.globl ASM_PFX(Vect2Desc)
+ASM_GLOBAL ASM_PFX(Vect2Desc)
ASM_PFX(Vect2Desc):
mov rax, rdx
mov word ptr [rcx], ax # write bits 15..0 of offset
@@ -136,13 +136,13 @@ ASM_PFX(Vect2Desc):
# Abstract: This code is not a function, but is a small piece of code that is
# copied and fixed up once for each IDT entry that is hooked.
#
-.globl ASM_PFX(InterruptEntryStub)
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)
ASM_PFX(InterruptEntryStub):
push 0 # push vector number - will be modified before installed
jmp ASM_PFX(CommonIdtEntry)
-.globl ASM_PFX(InterruptEntryStubEnd)
+ASM_GLOBAL ASM_PFX(InterruptEntryStubEnd)
ASM_PFX(InterruptEntryStubEnd):
#------------------------------------------------------------------------------
@@ -151,7 +151,7 @@ ASM_PFX(InterruptEntryStubEnd):
# Abstract: This code is not a function, but is the common part for all IDT
# vectors.
#
-.globl ASM_PFX(CommonIdtEntry)
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)
##
## At this point, the stub has saved the current application stack esp into AppRsp
## and switched stacks to the debug stack, where it pushed the vector number
diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
index add2f49670..8b787143b5 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
+++ b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
@@ -13,9 +13,9 @@
#
#**/
-.globl ASM_PFX(CopyMem)
+ASM_GLOBAL ASM_PFX(CopyMem)
-.globl ASM_PFX(EbcLLCALLEXNative)
+ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative)
ASM_PFX(EbcLLCALLEXNative):
push %ebp
push %ebx
@@ -42,16 +42,16 @@ ASM_PFX(EbcLLCALLEXNative):
pop %ebp
ret
-.globl ASM_PFX(EbcLLGetEbcEntryPoint)
+ASM_GLOBAL ASM_PFX(EbcLLGetEbcEntryPoint)
ASM_PFX(EbcLLGetEbcEntryPoint):
ret
-.globl ASM_PFX(EbcLLGetStackPointer)
+ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer)
ASM_PFX(EbcLLGetStackPointer):
mov %esp,%eax
add $0x4,%eax
ret
-.globl ASM_PFX(EbcLLGetReturnValue)
+ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue)
ASM_PFX(EbcLLGetReturnValue):
ret
diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.S
index f8b1cdc7ee..9db5786728 100644
--- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.S
+++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(CpuFlushTlb)
+ASM_GLOBAL ASM_PFX(CpuFlushTlb)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.S b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.S
index ac39e8fcba..c38195a3a8 100644
--- a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.S
+++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(CpuSleep)
+ASM_GLOBAL ASM_PFX(CpuSleep)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseCpuLib/Ipf/CpuFlushTlb.s b/MdePkg/Library/BaseCpuLib/Ipf/CpuFlushTlb.s
index 5546990992..bc918e1a34 100644
--- a/MdePkg/Library/BaseCpuLib/Ipf/CpuFlushTlb.s
+++ b/MdePkg/Library/BaseCpuLib/Ipf/CpuFlushTlb.s
@@ -17,7 +17,7 @@
.auto
.text
-.globl PalCall
+ASM_GLOBAL PalCall
.type PalCall, @function
.proc CpuFlushTlb
diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
index 042ebd4cad..03c45ba011 100644
--- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathARShiftU64)
+ASM_GLOBAL ASM_PFX(InternalMathARShiftU64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
index 693045c6fa..9530ccb9d6 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(CpuBreakpoint)
+ASM_GLOBAL ASM_PFX(CpuBreakpoint)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.S b/MdePkg/Library/BaseLib/Ia32/CpuId.S
index 86f001c22d..2865ec5142 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuId.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuId.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmCpuid)
+ASM_GLOBAL ASM_PFX(AsmCpuid)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
index 62ee83c4ac..2e1f9869b1 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
@@ -36,7 +36,7 @@
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmCpuidEx)
+ASM_GLOBAL ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %ebx
push %ebp
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.S b/MdePkg/Library/BaseLib/Ia32/CpuPause.S
index c29dcf34cb..60aa79c233 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuPause.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(CpuPause)
+ASM_GLOBAL ASM_PFX(CpuPause)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.S b/MdePkg/Library/BaseLib/Ia32/DisableCache.S
index b11245e519..215d8887d2 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisableCache.S
+++ b/MdePkg/Library/BaseLib/Ia32/DisableCache.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmDisableCache)
+ASM_GLOBAL ASM_PFX(AsmDisableCache)
ASM_PFX(AsmDisableCache):
movl %cr0, %eax
btsl $30, %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
index 1371779616..560185cd0e 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(DisableInterrupts)
+ASM_GLOBAL ASM_PFX(DisableInterrupts)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
index d7aeec50cf..9fd1251575 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
+++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86DisablePaging32)
+ASM_GLOBAL ASM_PFX(InternalX86DisablePaging32)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
index d679eafe70..3b3ec044f5 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathDivU64x32)
+ASM_GLOBAL ASM_PFX(InternalMathDivU64x32)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
index 87ca05357a..4dcc3f0d0a 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathDivRemU64x32)
+ASM_GLOBAL ASM_PFX(InternalMathDivRemU64x32)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
index b78697c73e..e87bb77fbc 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64)
+ASM_GLOBAL ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.S b/MdePkg/Library/BaseLib/Ia32/EnableCache.S
index bdb4bdbdb3..c6f5ff8338 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableCache.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnableCache.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmEnableCache)
+ASM_GLOBAL ASM_PFX(AsmEnableCache)
ASM_PFX(AsmEnableCache):
wbinvd
movl %cr0, %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
index 13307597a0..10a471f09b 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(EnableDisableInterrupts)
+ASM_GLOBAL ASM_PFX(EnableDisableInterrupts)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
index d4b8f59db8..db062d973e 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(EnableInterrupts)
+ASM_GLOBAL ASM_PFX(EnableInterrupts)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
index caecf8b0df..2afc12f86f 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86EnablePaging32)
+ASM_GLOBAL ASM_PFX(InternalX86EnablePaging32)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
index ce9d3eb2d9..06753afd13 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86EnablePaging64)
+ASM_GLOBAL ASM_PFX(InternalX86EnablePaging64)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
index b6bdb64a66..95eb0a62f7 100644
--- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
+++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmFlushCacheLine)
+ASM_GLOBAL ASM_PFX(AsmFlushCacheLine)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.S b/MdePkg/Library/BaseLib/Ia32/FxRestore.S
index bda14dd15e..73960c7cfd 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxRestore.S
+++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86FxRestore)
+ASM_GLOBAL ASM_PFX(InternalX86FxRestore)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.S b/MdePkg/Library/BaseLib/Ia32/FxSave.S
index b5c107f3ba..7d6b379b6d 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxSave.S
+++ b/MdePkg/Library/BaseLib/Ia32/FxSave.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86FxSave)
+ASM_GLOBAL ASM_PFX(InternalX86FxSave)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.S b/MdePkg/Library/BaseLib/Ia32/Invd.S
index e124fe84aa..25c59bcb1b 100644
--- a/MdePkg/Library/BaseLib/Ia32/Invd.S
+++ b/MdePkg/Library/BaseLib/Ia32/Invd.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmInvd)
+ASM_GLOBAL ASM_PFX(AsmInvd)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.S b/MdePkg/Library/BaseLib/Ia32/LRotU64.S
index 615ff8146a..246115dce6 100644
--- a/MdePkg/Library/BaseLib/Ia32/LRotU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathLRotU64)
+ASM_GLOBAL ASM_PFX(InternalMathLRotU64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S b/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
index dc99c8bb61..f36b4fb775 100644
--- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathLShiftU64)
+ASM_GLOBAL ASM_PFX(InternalMathLShiftU64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.S b/MdePkg/Library/BaseLib/Ia32/LongJump.S
index ba22456512..d04e1fdcd1 100644
--- a/MdePkg/Library/BaseLib/Ia32/LongJump.S
+++ b/MdePkg/Library/BaseLib/Ia32/LongJump.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalLongJump)
+ASM_GLOBAL ASM_PFX(InternalLongJump)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S b/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
index 00dc6a08ab..40787c912b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathModU64x32)
+ASM_GLOBAL ASM_PFX(InternalMathModU64x32)
#------------------------------------------------------------------------------
# UINT32
diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.S b/MdePkg/Library/BaseLib/Ia32/Monitor.S
index 48a87a1985..94f1f98f44 100644
--- a/MdePkg/Library/BaseLib/Ia32/Monitor.S
+++ b/MdePkg/Library/BaseLib/Ia32/Monitor.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmMonitor)
+ASM_GLOBAL ASM_PFX(AsmMonitor)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S b/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
index 857eeb27d7..9dbeae36be 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
@@ -22,7 +22,7 @@
.386:
.code:
-.globl ASM_PFX(InternalMathMultU64x32)
+ASM_GLOBAL ASM_PFX(InternalMathMultU64x32)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
index 8dbae8b1a9..d984f0e022 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathMultU64x64)
+ASM_GLOBAL ASM_PFX(InternalMathMultU64x64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.S b/MdePkg/Library/BaseLib/Ia32/Mwait.S
index 9fd1efd0c9..fc776166ea 100644
--- a/MdePkg/Library/BaseLib/Ia32/Mwait.S
+++ b/MdePkg/Library/BaseLib/Ia32/Mwait.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmMwait)
+ASM_GLOBAL ASM_PFX(AsmMwait)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.S b/MdePkg/Library/BaseLib/Ia32/RRotU64.S
index cc5807648a..4b7225b0e3 100644
--- a/MdePkg/Library/BaseLib/Ia32/RRotU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathRRotU64)
+ASM_GLOBAL ASM_PFX(InternalMathRRotU64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S b/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
index 1e747d43a0..e97f7f47bb 100644
--- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
@@ -22,7 +22,7 @@
.686:
.code:
-.globl ASM_PFX(InternalMathRShiftU64)
+ASM_GLOBAL ASM_PFX(InternalMathRShiftU64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.S b/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
index 60b1294046..7a3f1d4d83 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadCr0)
+ASM_GLOBAL ASM_PFX(AsmReadCr0)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.S b/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
index bf691dc5d0..faf576b4ee 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadCr2)
+ASM_GLOBAL ASM_PFX(AsmReadCr2)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.S b/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
index 33503c7dd7..49a9b8325a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadCr3)
+ASM_GLOBAL ASM_PFX(AsmReadCr3)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.S b/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
index 1ca9595352..77dd05b179 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadCr4)
+ASM_GLOBAL ASM_PFX(AsmReadCr4)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.S b/MdePkg/Library/BaseLib/Ia32/ReadCs.S
index 6a56c25106..c706cacaab 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadCs)
+ASM_GLOBAL ASM_PFX(AsmReadCs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.S b/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
index 1713a73b6c..4db6d0fd34 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr0)
+ASM_GLOBAL ASM_PFX(AsmReadDr0)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.S b/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
index c57ab052f7..f4f8aa8b77 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr1)
+ASM_GLOBAL ASM_PFX(AsmReadDr1)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.S b/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
index e5e825d5c1..610e9e12ef 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr2)
+ASM_GLOBAL ASM_PFX(AsmReadDr2)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.S b/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
index b63deae8a5..5789ef1a7a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr3)
+ASM_GLOBAL ASM_PFX(AsmReadDr3)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.S b/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
index 764e02f923..fd5b797976 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr4)
+ASM_GLOBAL ASM_PFX(AsmReadDr4)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.S b/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
index e9a08b5f61..d58d1c5fe2 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr5)
+ASM_GLOBAL ASM_PFX(AsmReadDr5)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.S b/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
index da5dacad47..9d6630434a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr6)
+ASM_GLOBAL ASM_PFX(AsmReadDr6)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.S b/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
index 4c95887370..0cec08d701 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDr7)
+ASM_GLOBAL ASM_PFX(AsmReadDr7)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.S b/MdePkg/Library/BaseLib/Ia32/ReadDs.S
index 29388b0df5..f24961637a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadDs)
+ASM_GLOBAL ASM_PFX(AsmReadDs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.S b/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
index 3fde96e61d..005d87eaf2 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadEflags)
+ASM_GLOBAL ASM_PFX(AsmReadEflags)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.S b/MdePkg/Library/BaseLib/Ia32/ReadEs.S
index 827d0df932..33fded18cc 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadEs)
+ASM_GLOBAL ASM_PFX(AsmReadEs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.S b/MdePkg/Library/BaseLib/Ia32/ReadFs.S
index 7cb7db6f02..36d6b334d5 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadFs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadFs)
+ASM_GLOBAL ASM_PFX(AsmReadFs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
index 771f3378ce..0ab045e70f 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86ReadGdtr)
+ASM_GLOBAL ASM_PFX(InternalX86ReadGdtr)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.S b/MdePkg/Library/BaseLib/Ia32/ReadGs.S
index 6169b9aa3c..92eda10228 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadGs)
+ASM_GLOBAL ASM_PFX(AsmReadGs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
index fb8e61b031..85fe9c1ae1 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86ReadIdtr)
+ASM_GLOBAL ASM_PFX(InternalX86ReadIdtr)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
index 2e534f79d3..cffdbde34e 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadLdtr)
+ASM_GLOBAL ASM_PFX(AsmReadLdtr)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.S b/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
index 5c9ac8a4fa..5c48533362 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm0)
+ASM_GLOBAL ASM_PFX(AsmReadMm0)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.S b/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
index 4dc3f402a0..66387d1622 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm1)
+ASM_GLOBAL ASM_PFX(AsmReadMm1)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.S b/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
index 15faee2fd0..a72761fe45 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm2)
+ASM_GLOBAL ASM_PFX(AsmReadMm2)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.S b/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
index 753f1f11b1..19c6161343 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm3)
+ASM_GLOBAL ASM_PFX(AsmReadMm3)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.S b/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
index 9e63b3b714..db3be1ad88 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm4)
+ASM_GLOBAL ASM_PFX(AsmReadMm4)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.S b/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
index 39a22b832a..2f2e640f9c 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm5)
+ASM_GLOBAL ASM_PFX(AsmReadMm5)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.S b/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
index f58b0fc735..2fd514ebc6 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm6)
+ASM_GLOBAL ASM_PFX(AsmReadMm6)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.S b/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
index da4e06a497..7fad933c79 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMm7)
+ASM_GLOBAL ASM_PFX(AsmReadMm7)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
index 28c5395988..4f650312ee 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadMsr64)
+ASM_GLOBAL ASM_PFX(AsmReadMsr64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.S b/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
index f26ff25450..42e958a40d 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadPmc)
+ASM_GLOBAL ASM_PFX(AsmReadPmc)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.S b/MdePkg/Library/BaseLib/Ia32/ReadSs.S
index 9645c0c9f1..94304160e9 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadSs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadSs)
+ASM_GLOBAL ASM_PFX(AsmReadSs)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.S b/MdePkg/Library/BaseLib/Ia32/ReadTr.S
index 250f95d5e5..679036f294 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadTr)
+ASM_GLOBAL ASM_PFX(AsmReadTr)
#------------------------------------------------------------------------------
# UINT16
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.S b/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
index e124274cdb..9b5b707939 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmReadTsc)
+ASM_GLOBAL ASM_PFX(AsmReadTsc)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.S b/MdePkg/Library/BaseLib/Ia32/SetJump.S
index dc7f048003..c8eaccb89a 100644
--- a/MdePkg/Library/BaseLib/Ia32/SetJump.S
+++ b/MdePkg/Library/BaseLib/Ia32/SetJump.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer)
+ASM_GLOBAL ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer)
#------------------------------------------------------------------------------
# UINTN
diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
index 31ff35f56d..bfccd8dc2a 100644
--- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
+++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
@@ -29,7 +29,7 @@
# IN UINT64 Operand
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMathSwapBytes64)
+ASM_GLOBAL ASM_PFX(InternalMathSwapBytes64)
ASM_PFX(InternalMathSwapBytes64):
movl 8(%esp), %eax # eax <- upper 32 bits
movl 4(%esp), %edx # edx <- lower 32 bits
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.S b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
index 6d6bb175e2..c4b8aa3639 100644
--- a/MdePkg/Library/BaseLib/Ia32/Thunk16.S
+++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
@@ -21,8 +21,8 @@
#include <Library/BaseLib.h>
-.globl ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)
-.globl ASM_PFX(InternalAsmThunk16)
+ASM_GLOBAL ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)
+ASM_GLOBAL ASM_PFX(InternalAsmThunk16)
ASM_PFX(m16Start):
diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.S b/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
index 17b36bbdc5..d2d4c4b2f9 100644
--- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
+++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWbinvd)
+ASM_GLOBAL ASM_PFX(AsmWbinvd)
ASM_PFX(AsmWbinvd):
wbinvd
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.S b/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
index 44994ef1c2..27da3013c8 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
@@ -28,7 +28,7 @@
# IN UINTN Cr0
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteCr0)
+ASM_GLOBAL ASM_PFX(AsmWriteCr0)
ASM_PFX(AsmWriteCr0):
movl 4(%esp), %eax
movl %eax, %cr0
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.S b/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
index 12d68b1ace..9a29faac7e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
@@ -28,7 +28,7 @@
# IN UINTN Cr2
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteCr2)
+ASM_GLOBAL ASM_PFX(AsmWriteCr2)
ASM_PFX(AsmWriteCr2):
movl 4(%esp), %eax
movl %eax, %cr2
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.S b/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
index bd6b2029ff..86e2c63d13 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
@@ -28,7 +28,7 @@
# IN UINTN Cr3
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteCr3)
+ASM_GLOBAL ASM_PFX(AsmWriteCr3)
ASM_PFX(AsmWriteCr3):
movl 4(%esp), %eax
movl %eax, %cr3
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.S b/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
index ddf9486bc9..6527b3e29e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
@@ -28,7 +28,7 @@
# IN UINTN Cr4
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteCr4)
+ASM_GLOBAL ASM_PFX(AsmWriteCr4)
ASM_PFX(AsmWriteCr4):
movl 4(%esp), %eax
movl %eax, %cr4
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.S b/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
index 41b414f901..ae555f4ae8 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr0)
+ASM_GLOBAL ASM_PFX(AsmWriteDr0)
ASM_PFX(AsmWriteDr0):
movl 4(%esp), %eax
movl %eax, %dr0
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.S b/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
index b496b17b6a..d143bd6965 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr1)
+ASM_GLOBAL ASM_PFX(AsmWriteDr1)
ASM_PFX(AsmWriteDr1):
movl 4(%esp), %eax
movl %eax, %dr1
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.S b/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
index eef837e84c..c6f89c7071 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr2)
+ASM_GLOBAL ASM_PFX(AsmWriteDr2)
ASM_PFX(AsmWriteDr2):
movl 4(%esp), %eax
movl %eax, %dr2
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.S b/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
index 5f75e20788..08c809b23b 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr3)
+ASM_GLOBAL ASM_PFX(AsmWriteDr3)
ASM_PFX(AsmWriteDr3):
movl 4(%esp), %eax
movl %eax, %dr3
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.S b/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
index 74106b3829..f38ecfadaa 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr4)
+ASM_GLOBAL ASM_PFX(AsmWriteDr4)
ASM_PFX(AsmWriteDr4):
movl 4(%esp), %eax
movl %eax, %dr4
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.S b/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
index 927ef7c9d6..5417b20e90 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr5)
+ASM_GLOBAL ASM_PFX(AsmWriteDr5)
ASM_PFX(AsmWriteDr5):
movl 4(%esp), %eax
movl %eax, %dr5
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.S b/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
index ef63c2a891..26d09798ef 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr6)
+ASM_GLOBAL ASM_PFX(AsmWriteDr6)
ASM_PFX(AsmWriteDr6):
movl 4(%esp), %eax
movl %eax, %dr6
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.S b/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
index b85e1b5d8a..6f6be94981 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
@@ -28,7 +28,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteDr7)
+ASM_GLOBAL ASM_PFX(AsmWriteDr7)
ASM_PFX(AsmWriteDr7):
movl 4(%esp), %eax
movl %eax, %dr7
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
index 6e84b3ecce..7bb07a807b 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
@@ -28,7 +28,7 @@
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86WriteGdtr)
+ASM_GLOBAL ASM_PFX(InternalX86WriteGdtr)
ASM_PFX(InternalX86WriteGdtr):
movl 4(%esp), %eax
lgdt (%eax)
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
index c32f77cce6..1f4857e0c4 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
@@ -28,7 +28,7 @@
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalX86WriteIdtr)
+ASM_GLOBAL ASM_PFX(InternalX86WriteIdtr)
ASM_PFX(InternalX86WriteIdtr):
movl 4(%esp), %eax
lidt (%eax)
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
index a368269680..133f6255eb 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
@@ -28,7 +28,7 @@
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteLdtr)
+ASM_GLOBAL ASM_PFX(AsmWriteLdtr)
ASM_PFX(AsmWriteLdtr):
movl 4(%esp), %eax
lldtw %ax
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.S b/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
index d79754766f..5db52d4493 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm0)
+ASM_GLOBAL ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
movq 4(%esp), %mm0
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.S b/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
index 9e64e31868..7cd2f4948a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm1)
+ASM_GLOBAL ASM_PFX(AsmWriteMm1)
ASM_PFX(AsmWriteMm1):
movq 4(%esp), %mm1
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.S b/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
index 793fc4dd0d..8cd336e840 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm2)
+ASM_GLOBAL ASM_PFX(AsmWriteMm2)
ASM_PFX(AsmWriteMm2):
movq 4(%esp), %mm2
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.S b/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
index 08c8017456..92a4d098c9 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm3)
+ASM_GLOBAL ASM_PFX(AsmWriteMm3)
ASM_PFX(AsmWriteMm3):
movq 4(%esp), %mm3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.S b/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
index 9e8b5a70c1..86f1caed70 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm4)
+ASM_GLOBAL ASM_PFX(AsmWriteMm4)
ASM_PFX(AsmWriteMm4):
movq 4(%esp), %mm4
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.S b/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
index 62c2368263..7343c6835e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm5)
+ASM_GLOBAL ASM_PFX(AsmWriteMm5)
ASM_PFX(AsmWriteMm5):
movq 4(%esp), %mm5
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.S b/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
index e7f999b129..55a188544a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm6)
+ASM_GLOBAL ASM_PFX(AsmWriteMm6)
ASM_PFX(AsmWriteMm6):
movq 4(%esp), %mm6
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.S b/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
index 784d54c60c..b9433200ba 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMm7)
+ASM_GLOBAL ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movq 4(%esp), %mm7
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
index 42a70d041a..cb088dc29e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmWriteMsr64)
+ASM_GLOBAL ASM_PFX(AsmWriteMsr64)
ASM_PFX(AsmWriteMsr64):
movl 12(%esp), %edx
movl 8(%esp), %eax
diff --git a/MdePkg/Library/BaseLib/Ipf/SetJmp.s b/MdePkg/Library/BaseLib/Ipf/SetJmp.s
index 57c7ad6df2..0f5150945d 100644
--- a/MdePkg/Library/BaseLib/Ipf/SetJmp.s
+++ b/MdePkg/Library/BaseLib/Ipf/SetJmp.s
@@ -17,7 +17,7 @@
.auto
.text
-.globl InternalAssertJumpBuffer
+ASM_GLOBAL InternalAssertJumpBuffer
.type InternalAssertJumpBuffer, @function
.proc SetJump
diff --git a/MdePkg/Library/BaseLib/X64/DisableCache.S b/MdePkg/Library/BaseLib/X64/DisableCache.S
index 678290888e..44705f3bc6 100644
--- a/MdePkg/Library/BaseLib/X64/DisableCache.S
+++ b/MdePkg/Library/BaseLib/X64/DisableCache.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmDisableCache)
+ASM_GLOBAL ASM_PFX(AsmDisableCache)
ASM_PFX(AsmDisableCache):
movq %cr0, %rax
btsq $30, %rax
diff --git a/MdePkg/Library/BaseLib/X64/EnableCache.S b/MdePkg/Library/BaseLib/X64/EnableCache.S
index 5c28b43857..42cd9eb24c 100644
--- a/MdePkg/Library/BaseLib/X64/EnableCache.S
+++ b/MdePkg/Library/BaseLib/X64/EnableCache.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(AsmEnableCache)
+ASM_GLOBAL ASM_PFX(AsmEnableCache)
ASM_PFX(AsmEnableCache):
wbinvd
movq %cr0, %rax
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.S b/MdePkg/Library/BaseLib/X64/Thunk16.S
index f9770b258c..a1af5128f2 100644
--- a/MdePkg/Library/BaseLib/X64/Thunk16.S
+++ b/MdePkg/Library/BaseLib/X64/Thunk16.S
@@ -21,13 +21,13 @@
#include <Library/BaseLib.h>
-.globl ASM_PFX(m16Start)
-.globl ASM_PFX(m16Size)
-.globl ASM_PFX(mThunk16Attr)
-.globl ASM_PFX(m16Gdt)
-.globl ASM_PFX(m16GdtrBase)
-.globl ASM_PFX(mTransition)
-.globl ASM_PFX(InternalAsmThunk16)
+ASM_GLOBAL ASM_PFX(m16Start)
+ASM_GLOBAL ASM_PFX(m16Size)
+ASM_GLOBAL ASM_PFX(mThunk16Attr)
+ASM_GLOBAL ASM_PFX(m16Gdt)
+ASM_GLOBAL ASM_PFX(m16GdtrBase)
+ASM_GLOBAL ASM_PFX(mTransition)
+ASM_GLOBAL ASM_PFX(InternalAsmThunk16)
# define the structure of IA32_REGS
.equ _EDI, 0 #size 4
@@ -66,7 +66,7 @@ SavedGdt: .space 10
# _BackFromUserCode() takes control in real mode after 'retf' has been executed
# by user code. It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
-.globl ASM_PFX(BackFromUserCode)
+ASM_GLOBAL ASM_PFX(BackFromUserCode)
ASM_PFX(BackFromUserCode):
#
# The order of saved registers on the stack matches the order they appears
@@ -156,7 +156,7 @@ _16Idtr: .word 0x3ff
# _ToUserCode() takes control in real mode before passing control to user code.
# It will be shadowed to somewhere in memory below 1MB.
#------------------------------------------------------------------------------
-.globl ASM_PFX(ToUserCode)
+ASM_GLOBAL ASM_PFX(ToUserCode)
ASM_PFX(ToUserCode):
movl %edx,%ss # set new segment selectors
movl %edx,%ds
@@ -231,7 +231,7 @@ ASM_PFX(_32Data):
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalAsmThunk16)
+ASM_GLOBAL ASM_PFX(InternalAsmThunk16)
ASM_PFX(InternalAsmThunk16):
pushq %rbp
pushq %rbx
@@ -293,12 +293,12 @@ L_RetFromRealMode:
.byte 0x0f, 0xa9 # pop gs
.byte 0x0f, 0xa1 # pop fs
- popq %rbx
- movq %rbx, %ss
- popq %rbx
- movq %rbx, %es
- popq %rbx
- movq %rbx, %ds
+ popq %rbx
+ movq %rbx, %ss
+ popq %rbx
+ movq %rbx, %es
+ popq %rbx
+ movq %rbx, %ds
popq %rdi
popq %rsi
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
index e3da4ffb95..49738b403d 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CompareMem.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
index ea75f70001..6d7f98350f 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
index d8bb46b12e..280f615c6b 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem16.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
index dfc36fdb66..d824177e3c 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem32.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
index 3b67d4c056..785ecd0fed 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem64.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
index b3226052c8..14979e2f09 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ScanMem8.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
index ed4e15e3ca..44bbbe08a8 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
index b8066b7784..f7f14afd3a 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
index f6d786e255..df27420adc 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
index 7bbf694db8..9ca5f5b88a 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
index 7d93d5be09..26d50bc709 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
index 308c1e0ce6..c207db7dda 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
index 19f70034f6..3a336f7e98 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
index 26b463bd84..140b0a40e5 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
index 9acbe788b8..9420725d5e 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
index addc05758d..d39f17fac3 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
index c5b5a55cbf..74667a6200 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
index 73ff47058a..814d20c7ce 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push rdi
mov rax, r8
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
index 5fdb844330..e3e6620314 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
push rdi
mov rax, r8
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
index 73a546113d..a67ca6a843 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S
@@ -35,7 +35,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
movq mm0, r8 # mm0 <- Value
mov rax, rcx # rax <- Buffer
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
index 618412ac18..36312d4e7e 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
movq mm0, r8 #Value
mov rax, rcx #rax <- Buffer
diff --git a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
index 1dbc3be847..b5dec03031 100644
--- a/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibMmx/X64/ZeroMem.S
@@ -33,7 +33,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
index 80b08b41e7..c038d68b96 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CompareMem.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
index 1000ef5c48..fedc064abf 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
index d8bb46b12e..280f615c6b 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem16.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
index fb715b9b9c..585dc2b2e5 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem32.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
index 576c1e1f77..2b44deaaf4 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem64.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
index 072dde89a4..2e22aa0594 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ScanMem8.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
index 726ccd76fb..e6324caa14 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
index 4f1ec70e7f..3eb7bdb6a5 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
index 309ff739b3..5770c8d270 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
index c0fa108713..0b9e798266 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
index d192e2f573..d169d8e4c3 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
index 308c1e0ce6..c207db7dda 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
index ac67abf6d8..c05e50aa9d 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
index 26b463bd84..140b0a40e5 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem16.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
index 9acbe788b8..9420725d5e 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem32.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
index addc05758d..d39f17fac3 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem64.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
index c5b5a55cbf..74667a6200 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ScanMem8.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
index 91e9e88815..c7c07ad309 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S
@@ -30,7 +30,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push rdi
push rbx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
index c1cb0a8644..c091131a75 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem16.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
index 2230358e15..9fbcdafcb4 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem32.S
@@ -35,7 +35,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
index 71cef0bde7..c4f0b4685d 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem64.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
index 9d09754281..6cd1474420 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/X64/ZeroMem.S
@@ -33,7 +33,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
push rdi
push rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.S
index 80b08b41e7..c038d68b96 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CompareMem.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S
index 41aea6cdbb..436dc32c0e 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.S
index e6f074ad87..6af8b49928 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem16.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.S
index dfc36fdb66..d824177e3c 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem32.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.S
index 576c1e1f77..2b44deaaf4 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem64.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.S
index 072dde89a4..2e22aa0594 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ScanMem8.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S
index 726ccd76fb..e6324caa14 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.S
index 4f1ec70e7f..3eb7bdb6a5 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.S
index 309ff739b3..5770c8d270 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.S
index c0fa108713..0b9e798266 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.S
index d192e2f573..d169d8e4c3 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
index 308c1e0ce6..c207db7dda 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/CompareMem.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
index 43cbeb91b2..2ab574621e 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/CopyMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
index 26b463bd84..140b0a40e5 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem16.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
index 9acbe788b8..9420725d5e 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem32.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
index 17976eb85b..917c37c3c5 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem64.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
index c5b5a55cbf..74667a6200 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ScanMem8.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
index 1d4e73ced7..cae41c3cab 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push rdi
mov rax, r8 # rax = Value
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
index c1cb0a8644..c091131a75 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem16.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
index 2230358e15..9fbcdafcb4 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem32.S
@@ -35,7 +35,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
index 71cef0bde7..c4f0b4685d 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/SetMem64.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
index a394c0f080..73bb786943 100644
--- a/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptPei/X64/ZeroMem.S
@@ -33,7 +33,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
push rdi
push rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S
index e3da4ffb95..49738b403d 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CompareMem.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S
index 22f494fac1..8db0607b7b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
index d8bb46b12e..280f615c6b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem16.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
index dfc36fdb66..d824177e3c 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem32.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
index 3b67d4c056..785ecd0fed 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem64.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
index b3226052c8..14979e2f09 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ScanMem8.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S
index 9abf0cd86c..d09770f02e 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem.S
@@ -24,7 +24,7 @@
.386:
.code:
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S
index 9b88048bb9..d67eefd99b 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S
index 31d9d1d9e7..82ca941d9f 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S
index 34075780d1..809321dd53 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S
index d0af0ab772..ae1f320082 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
index 308c1e0ce6..c207db7dda 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CompareMem.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
index b3bf6ff61c..4477006e41 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/CopyMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
index 26b463bd84..140b0a40e5 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem16.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
index 9acbe788b8..9420725d5e 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem32.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
index 17976eb85b..917c37c3c5 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem64.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
index c5b5a55cbf..74667a6200 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ScanMem8.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
index 1d4e73ced7..cae41c3cab 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push rdi
mov rax, r8 # rax = Value
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
index c1cb0a8644..c091131a75 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem16.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
index 2230358e15..9fbcdafcb4 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem32.S
@@ -35,7 +35,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
index 71cef0bde7..c4f0b4685d 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/SetMem64.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
index a394c0f080..73bb786943 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibRepStr/X64/ZeroMem.S
@@ -33,7 +33,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
push rdi
push rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S
index e3da4ffb95..49738b403d 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CompareMem.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S
index d43464c2cd..e15942b11d 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S
index d8bb46b12e..280f615c6b 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem16.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S
index dfc36fdb66..d824177e3c 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem32.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S
index 3b67d4c056..785ecd0fed 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem64.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S
index b3226052c8..14979e2f09 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ScanMem8.S
@@ -29,7 +29,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S
index 850b6e8981..c3f82430cb 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem.S
@@ -34,7 +34,7 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push %edi
movl 12(%esp), %edx # edx <- Count
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S
index c6366d8d6b..d265f02bee 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S
index dde62257e8..5fab10dd42 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S
index 6d5ead5f3f..68b4019f43 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S
index 6058a4c85a..a17ab75f18 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
index 308c1e0ce6..c207db7dda 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/CompareMem.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCompareMem)
+ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
index 233bf7d71f..e5cfa7eadf 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemCopyMem)
+ASM_GLOBAL ASM_PFX(InternalMemCopyMem)
ASM_PFX(InternalMemCopyMem):
push rsi
push rdi
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
index 26b463bd84..140b0a40e5 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem16.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem16)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem16)
ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
index 9acbe788b8..9420725d5e 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem32.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem32)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem32)
ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
index 17976eb85b..917c37c3c5 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem64.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem64)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem64)
ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
index c5b5a55cbf..74667a6200 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ScanMem8.S
@@ -43,7 +43,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemScanMem8)
+ASM_GLOBAL ASM_PFX(InternalMemScanMem8)
ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
index 5adad7fb26..d2c25420c1 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem)
ASM_PFX(InternalMemSetMem):
push rdi
mov rdi, rcx # rdi <- Buffer
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
index 1f489022e6..3da0efcb86 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem16.S
@@ -35,7 +35,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem16)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem16)
ASM_PFX(InternalMemSetMem16):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
index faec90714c..ff6b0d7b4e 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem32.S
@@ -35,7 +35,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem32)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem32)
ASM_PFX(InternalMemSetMem32):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
index 0dbaa6a615..adfbb0c42e 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/SetMem64.S
@@ -34,7 +34,7 @@
# )
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemSetMem64)
+ASM_GLOBAL ASM_PFX(InternalMemSetMem64)
ASM_PFX(InternalMemSetMem64):
mov rax, rcx # rax <- Buffer
xchg rcx, rdx # rcx <- Count & rdx <- Buffer
diff --git a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
index 5cbc7e3f3b..bb2a194544 100644
--- a/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
+++ b/MdePkg/Library/BaseMemoryLibSse2/X64/ZeroMem.S
@@ -33,7 +33,7 @@
# );
#------------------------------------------------------------------------------
.intel_syntax noprefix
-.globl ASM_PFX(InternalMemZeroMem)
+ASM_GLOBAL ASM_PFX(InternalMemZeroMem)
ASM_PFX(InternalMemZeroMem):
push rdi
mov rdi, rcx
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.S b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.S
index 767343d823..392f90970b 100644
--- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.S
+++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalSyncCompareExchange32)
+ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange32)
#------------------------------------------------------------------------------
# UINT32
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.S b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.S
index 03aebff91d..6f43acb7d5 100644
--- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.S
+++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalSyncCompareExchange64)
+ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange64)
#------------------------------------------------------------------------------
# UINT64
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.S b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.S
index bea5ac1d74..f095270a11 100644
--- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.S
+++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalSyncDecrement)
+ASM_GLOBAL ASM_PFX(InternalSyncDecrement)
#------------------------------------------------------------------------------
# UINT32
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.S b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.S
index 6efbcee5ea..26243d8f76 100644
--- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.S
+++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl ASM_PFX(InternalSyncIncrement)
+ASM_GLOBAL ASM_PFX(InternalSyncIncrement)
#------------------------------------------------------------------------------
# UINT32
diff --git a/UnixPkg/Sec/Stack.S b/UnixPkg/Sec/Stack.S
index 50f07b0894..ae9fe9ba9e 100644
--- a/UnixPkg/Sec/Stack.S
+++ b/UnixPkg/Sec/Stack.S
@@ -30,7 +30,7 @@
#include <ProcessorBind.h>
-.globl ASM_PFX(SecSwitchStack)
+ASM_GLOBAL ASM_PFX(SecSwitchStack)
ASM_PFX(SecSwitchStack):
#
# Save three register: eax, ebx, ecx