summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-15 03:25:20 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-15 03:25:20 +0000
commit34e4a9a65101f70a2a51f04655ab1006de96865a (patch)
tree0c4d4bfb53577df009971881087376b8df833265
parentd3c0cbcecc0c1fd5306819e4fee02c95be258156 (diff)
downloadedk2-34e4a9a65101f70a2a51f04655ab1006de96865a.zip
edk2-34e4a9a65101f70a2a51f04655ab1006de96865a.tar.gz
edk2-34e4a9a65101f70a2a51f04655ab1006de96865a.tar.bz2
cleanup the .S file to wrap all public symbols with ASM_PFX() macro,which is used to generate underscore prior to public symbol or not within various GCC distribution versions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8317 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S4
104 files changed, 254 insertions, 254 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S
index 710006b..a4ac2f1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuBreakpoint.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.global _CpuBreakpoint
-_CpuBreakpoint:
+.global ASM_PFX(CpuBreakpoint)
+ASM_PFX(CpuBreakpoint):
int $0x3
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S
index 98d7faa..bd0d8d0 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuId.S
@@ -32,8 +32,8 @@
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.global _AsmCpuid;
-_AsmCpuid:
+.global ASM_PFX(AsmCpuid)
+ASM_PFX(AsmCpuid):
push %rbx
mov %ecx, %eax
push %rax # save Index on stack
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S
index e5317e0..d7154eb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuIdEx.S
@@ -33,8 +33,8 @@
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.global _AsmCpuidEx
-_AsmCpuidEx:
+.global ASM_PFX(AsmCpuidEx)
+ASM_PFX(AsmCpuidEx):
push %rbx
movl %ecx,%eax
movl %edx,%ecx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S
index 0ecaa85..f71fdec 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuPause.S
@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _CpuPause;
-_CpuPause:
+.global ASM_PFX(CpuPause)
+ASM_PFX(CpuPause):
pause
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S
index 681e4c1..658cb1a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/CpuSleep.S
@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _CpuSleep;
-_CpuSleep:
+.global ASM_PFX(CpuSleep)
+ASM_PFX(CpuSleep):
hlt
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S
index da16886..eff3ccc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisableInterrupts.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _DisableInterrupts;
-_DisableInterrupts:
+.global ASM_PFX(DisableInterrupts)
+ASM_PFX(DisableInterrupts):
cli
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S
index d23313d..4ca4145 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/DisablePaging64.S
@@ -35,8 +35,8 @@
# );
#------------------------------------------------------------------------------
-.global _InternalX86DisablePaging64
-_InternalX86DisablePaging64:
+.global ASM_PFX(InternalX86DisablePaging64)
+ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx
lea (%rip), %eax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
index 581b7bb..d87d778 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableDisableInterrupts.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _EnableDisableInterrupts;
-.align 16;
-_EnableDisableInterrupts:
+.global ASM_PFX(EnableDisableInterrupts)
+.align 16
+ASM_PFX(EnableDisableInterrupts):
sti
cli
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S
index b81bcd0..220976f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnableInterrupts.S
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _EnableInterrupts;
-_EnableInterrupts:
+.global ASM_PFX(EnableInterrupts)
+ASM_PFX(EnableInterrupts):
sti
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S
index 15209c0..452bd39 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/EnablePaging64.S
@@ -33,8 +33,8 @@
# IN UINT64 NewStack %r8
# );
#------------------------------------------------------------------------------
-.global _InternalX86EnablePaging64;
-_InternalX86EnablePaging64:
+.global ASM_PFX(InternalX86EnablePaging64)
+ASM_PFX(InternalX86EnablePaging64):
cli
pop %rax
callq Base
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S
index 4c5a52f..0d05d41 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FlushCacheLine.S
@@ -29,8 +29,8 @@
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
-.global _AsmFlushCacheLine;
-_AsmFlushCacheLine:
+.global ASM_PFX(AsmFlushCacheLine)
+ASM_PFX(AsmFlushCacheLine):
clflush (%rdi)
mov %rdi, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S
index cc9750c..4497fe6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxRestore.S
@@ -29,7 +29,7 @@
# IN CONST IA32_FX_BUFFER *Buffer
# )#
#------------------------------------------------------------------------------
-.global _InternalX86FxRestore;
-_InternalX86FxRestore:
+.global ASM_PFX(InternalX86FxRestore)
+ASM_PFX(InternalX86FxRestore):
fxrstor (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S
index 432d7b9..0e8e1fc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/FxSave.S
@@ -29,7 +29,7 @@
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
-.global _InternalX86FxSave;
-_InternalX86FxSave:
+.global ASM_PFX(InternalX86FxSave)
+ASM_PFX(InternalX86FxSave):
fxsave (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S
index cd85279..d248a10 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange32.S
@@ -30,8 +30,8 @@
# IN UINT32 ExchangeValue
# );
#------------------------------------------------------------------------------
-.global _InternalSyncCompareExchange32;
-_InternalSyncCompareExchange32:
+.global ASM_PFX(InternalSyncCompareExchange32)
+ASM_PFX(InternalSyncCompareExchange32):
mov %edx, %eax
lock cmpxchg %r8d, (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
index ae27964..95f9d05 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedCompareExchange64.S
@@ -31,9 +31,9 @@
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
-.global _InternalSyncCompareExchange64;
-.align 16;
-_InternalSyncCompareExchange64:
+.global ASM_PFX(InternalSyncCompareExchange64)
+.align 16
+ASM_PFX(InternalSyncCompareExchange64):
mov %rsi, %rax
lock cmpxchg %rdx,(%rdi)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S
index 59ca54b..c3075bf 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedDecrement.S
@@ -29,8 +29,8 @@
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-.global _InternalSyncDecrement;
-_InternalSyncDecrement:
+.global ASM_PFX(InternalSyncDecrement)
+ASM_PFX(InternalSyncDecrement):
lock decl (%rcx)
mov (%rcx), %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S
index df4cb97..6b95ed4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/InterlockedIncrement.S
@@ -29,8 +29,8 @@
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-.global _InternalSyncIncrement;
-_InternalSyncIncrement:
+.global ASM_PFX(InternalSyncIncrement)
+ASM_PFX(InternalSyncIncrement):
lock incl (%rcx)
mov (%rcx), %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S
index 030ae45..fc1cad6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Invd.S
@@ -29,7 +29,7 @@
# VOID
# )#
#------------------------------------------------------------------------------
-.global _AsmInvd;
-_AsmInvd:
+.global ASM_PFX(AsmInvd)
+ASM_PFX(AsmInvd):
invd
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S
index 1a6f859..1d6a916 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/LongJump.S
@@ -27,8 +27,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global _InternalLongJump
-_InternalLongJump:
+.global ASM_PFX(InternalLongJump)
+ASM_PFX(InternalLongJump):
mov (%rcx), %rbx
mov 0x8(%rcx), %rsp
mov 0x10(%rcx), %rbp
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
index 13da27d..f31cbeb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Monitor.S
@@ -31,9 +31,9 @@
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
-.global _AsmMonitor;
-.align 16;
-_AsmMonitor:
+.global ASM_PFX(AsmMonitor)
+.align 16
+ASM_PFX(AsmMonitor):
mov %ecx,%eax
mov %edx,%ecx
mov %r8d,%edx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
index a32d004..ac5f549 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Mwait.S
@@ -30,9 +30,9 @@
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
-.global _AsmMwait;
-.align 16;
-_AsmMwait:
+.global ASM_PFX(AsmMwait)
+.align 16
+ASM_PFX(AsmMwait):
mov %ecx,%eax
mov %edx,%ecx
mwait %rax,%rcx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
index fa916d0..723869a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr0.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadCr0;
-.align 16;
-_AsmReadCr0:
+.global ASM_PFX(AsmReadCr0)
+.align 16
+ASM_PFX(AsmReadCr0):
mov %cr0, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S
index 96361be..e50a5a5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr2.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadCr2;
-.align 16;
-_AsmReadCr2:
+.global ASM_PFX(AsmReadCr2)
+.align 16
+ASM_PFX(AsmReadCr2):
mov %cr2, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S
index 480486f..6de241b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr3.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadCr3;
-.align 16;
-_AsmReadCr3:
+.global ASM_PFX(AsmReadCr3)
+.align 16
+ASM_PFX(AsmReadCr3):
mov %cr3, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S
index e89b5cd..467ab14 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCr4.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadCr4;
-.align 16;
-_AsmReadCr4:
+.global ASM_PFX(AsmReadCr4)
+.align 16
+ASM_PFX(AsmReadCr4):
mov %cr4, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S
index 677747b..88ad7da 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadCs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadCs;
-.align 16;
-_AsmReadCs:
+.global ASM_PFX(AsmReadCs)
+.align 16
+ASM_PFX(AsmReadCs):
mov %cs, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S
index 1b441c3..2e537a4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr0.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr0;
-.align 16;
-_AsmReadDr0:
+.global ASM_PFX(AsmReadDr0)
+.align 16
+ASM_PFX(AsmReadDr0):
mov %dr0, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S
index 5151a80..6295c4b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr1.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr1;
-.align 16;
-_AsmReadDr1:
+.global ASM_PFX(AsmReadDr1)
+.align 16
+ASM_PFX(AsmReadDr1):
mov %dr1, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S
index f4516af..2942e5c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr2.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr2;
-.align 16;
-_AsmReadDr2:
+.global ASM_PFX(AsmReadDr2)
+.align 16
+ASM_PFX(AsmReadDr2):
mov %dr2, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S
index c5c679c..9907963 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr3.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr3;
-.align 16;
-_AsmReadDr3:
+.global ASM_PFX(AsmReadDr3)
+.align 16
+ASM_PFX(AsmReadDr3):
mov %dr3, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
index f98c9ed..d1bd8ea 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr4.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr4;
-.align 16;
-_AsmReadDr4:
+.global ASM_PFX(AsmReadDr4)
+.align 16
+ASM_PFX(AsmReadDr4):
#DB 0fh, 21h, 0e0h
mov %dr4, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
index 421f57a..94475ad 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr5.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr5;
-.align 16;
-_AsmReadDr5:
+.global ASM_PFX(AsmReadDr5)
+.align 16
+ASM_PFX(AsmReadDr5):
mov %dr5, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S
index 6a159d8..ef0dc71 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr6.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr6;
-.align 16;
-_AsmReadDr6:
+.global ASM_PFX(AsmReadDr6)
+.align 16
+ASM_PFX(AsmReadDr6):
mov %dr6, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S
index 9ffb09d..60c9ed9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDr7.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDr7;
-.align 16;
-_AsmReadDr7:
+.global ASM_PFX(AsmReadDr7)
+.align 16
+ASM_PFX(AsmReadDr7):
mov %dr7, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S
index 58bee11..c9ef401 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadDs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadDs;
-.align 16;
-_AsmReadDs:
+.global ASM_PFX(AsmReadDs)
+.align 16
+ASM_PFX(AsmReadDs):
movl %ds, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
index e895387..e5bd4bd 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEflags.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadEflags;
-.align 16;
-_AsmReadEflags:
+.global ASM_PFX(AsmReadEflags)
+.align 16
+ASM_PFX(AsmReadEflags):
pushfq
pop %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
index 93df650..f98e577 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadEs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadEs;
-.align 16;
-_AsmReadEs:
+.global ASM_PFX(AsmReadEs)
+.align 16
+ASM_PFX(AsmReadEs):
mov %es, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S
index ff658e1..28b288f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadFs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadFs;
-.align 16;
-_AsmReadFs:
+.global ASM_PFX(AsmReadFs)
+.align 16
+ASM_PFX(AsmReadFs):
mov %fs, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S
index c271a02..08f3fdf 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGdtr.S
@@ -29,8 +29,8 @@
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
-.global _InternalX86ReadGdtr;
-.align 16;
-_InternalX86ReadGdtr:
+.global ASM_PFX(InternalX86ReadGdtr)
+.align 16
+ASM_PFX(InternalX86ReadGdtr):
sgdt (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S
index f92776c..cb119e8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadGs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadGs;
-.align 16;
-_AsmReadGs:
+.global ASM_PFX(AsmReadGs)
+.align 16
+ASM_PFX(AsmReadGs):
mov %gs, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S
index cd7c09e..04f08e6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadIdtr.S
@@ -29,8 +29,8 @@
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global _InternalX86ReadIdtr;
-.align 16;
-_InternalX86ReadIdtr:
+.global ASM_PFX(InternalX86ReadIdtr)
+.align 16
+ASM_PFX(InternalX86ReadIdtr):
sidt (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S
index fac8e25..ed53d8d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadLdtr.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadLdtr;
-.align 16;
-_AsmReadLdtr:
+.global ASM_PFX(AsmReadLdtr)
+.align 16
+ASM_PFX(AsmReadLdtr):
sldt %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
index b5912ca..b14b061 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm0.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm0;
-.align 16;
-_AsmReadMm0:
+.global ASM_PFX(AsmReadMm0)
+.align 16
+ASM_PFX(AsmReadMm0):
#DB 48h, 0fh, 7eh, 0c0h
movd %mm0, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
index 1f26cd4..6af2b17 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm1.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm1;
-.align 16;
-_AsmReadMm1:
+.global ASM_PFX(AsmReadMm1)
+.align 16
+ASM_PFX(AsmReadMm1):
#DB 48h, 0fh, 7eh, 0c8h
movd %mm1, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
index ef864af..d80ad64 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm2.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm2;
-.align 16;
-_AsmReadMm2:
+.global ASM_PFX(AsmReadMm2)
+.align 16
+ASM_PFX(AsmReadMm2):
#DB 48h, 0fh, 7eh, 0d0h
movd %mm2, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
index bd76cb2..7885952 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm3.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm3;
-.align 16;
-_AsmReadMm3:
+.global ASM_PFX(AsmReadMm3)
+.align 16
+ASM_PFX(AsmReadMm3):
#DB 48h, 0fh, 7eh, 0d8h
movd %mm3, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
index 99d7668..8c9830c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm4.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm4;
-.align 16;
-_AsmReadMm4:
+.global ASM_PFX(AsmReadMm4)
+.align 16
+ASM_PFX(AsmReadMm4):
#DB 48h, 0fh, 7eh, 0e0h
movd %mm4, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
index 7a01c53..19f0fa4 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm5.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm5;
-.align 16;
-_AsmReadMm5:
+.global ASM_PFX(AsmReadMm5)
+.align 16
+ASM_PFX(AsmReadMm5):
#DB 48h, 0fh, 7eh, 0e8h
movd %mm5, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
index 0c7ea79..49cf4f3 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm6.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm6;
-.align 16;
-_AsmReadMm6:
+.global ASM_PFX(AsmReadMm6)
+.align 16
+ASM_PFX(AsmReadMm6):
#DB 48h, 0fh, 7eh, 0f0h
movd %mm6, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
index 68f1dbd..94abd77 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMm7.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadMm7;
-.align 16;
-_AsmReadMm7:
+.global ASM_PFX(AsmReadMm7)
+.align 16
+ASM_PFX(AsmReadMm7):
#DB 48h, 0fh, 7eh, 0f8h
movd %mm7, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
index ac101cd..bcb3836 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadMsr64.S
@@ -29,9 +29,9 @@
# IN UINT32 Index
# );
#------------------------------------------------------------------------------
-.global _AsmReadMsr64;
-.align 16;
-_AsmReadMsr64:
+.global ASM_PFX(AsmReadMsr64)
+.align 16
+ASM_PFX(AsmReadMsr64):
rdmsr # edx & eax are zero extended
shl $0x20, %rdx
or %rdx, %rax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
index 115f633..3a75dbc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadPmc.S
@@ -29,9 +29,9 @@
# IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
-.global _AsmReadPmc;
-.align 16;
-_AsmReadPmc:
+.global ASM_PFX(AsmReadPmc)
+.align 16
+ASM_PFX(AsmReadPmc):
rdpmc
shl $0x20, %rdx
or %rdx, %rax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
index a93a703..3a9db78 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadSs.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadSs;
-.align 16;
-_AsmReadSs:
+.global ASM_PFX(AsmReadSs);
+.align 16
+ASM_PFX(AsmReadSs):
movl %ss, %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S
index 5e3146b..ce463d2 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTr.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadTr;
-.align 16;
-_AsmReadTr:
+.global ASM_PFX(AsmReadTr)
+.align 16
+ASM_PFX(AsmReadTr):
str %eax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
index 776ffc2..2f47083 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/ReadTsc.S
@@ -29,9 +29,9 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmReadTsc;
-.align 16;
-_AsmReadTsc:
+.global ASM_PFX(AsmReadTsc)
+.align 16
+ASM_PFX(AsmReadTsc):
rdtsc
shl $0x20, %rdx
or %rdx, %rax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S
index eaaa43b..198628d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SetJump.S
@@ -20,8 +20,8 @@
#------------------------------------------------------------------------------
.extern InternalAssertJumpBuffer;
-.global _SetJump;
-_SetJump:
+.global ASM_PFX(SetJump)
+ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
call _InternalAssertJumpBuffer
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S
index 85cdb43..367aea8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.S
@@ -35,8 +35,8 @@
# None
#
#------------------------------------------------------------------------------
-.global _InternalSwitchStack;
-_InternalSwitchStack:
+.global ASM_PFX(InternalSwitchStack)
+ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
mov %r8, %rdx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
index a4b9704..d21c8a7 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Wbinvd.S
@@ -29,8 +29,8 @@
# VOID
# );
#------------------------------------------------------------------------------
-.global _AsmWbinvd;
-.align 16;
-_AsmWbinvd:
+.global ASM_PFX(AsmWbinvd)
+.align 16
+ASM_PFX(AsmWbinvd):
wbinvd
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S
index f77dc81..91976fc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr0.S
@@ -29,8 +29,8 @@
# UINTN Cr0
# );
#------------------------------------------------------------------------------
-.global _AsmWriteCr0;
-_AsmWriteCr0:
+.global ASM_PFX(AsmWriteCr0)
+ASM_PFX(AsmWriteCr0):
mov %rcx,%cr0
mov %rcx,%rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S
index 9fc14c6..3a8eac8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr2.S
@@ -29,8 +29,8 @@
# UINTN Cr2
# );
#------------------------------------------------------------------------------
-.global _AsmWriteCr2;
-_AsmWriteCr2:
+.global ASM_PFX(AsmWriteCr2)
+ASM_PFX(AsmWriteCr2):
mov %rcx,%cr2
mov %rcx,%rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S
index 880ed97..6c28ec6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr3.S
@@ -29,8 +29,8 @@
# UINTN Cr3
# );
#------------------------------------------------------------------------------
-.global _AsmWriteCr3;
-_AsmWriteCr3:
+.global ASM_PFX(AsmWriteCr3)
+ASM_PFX(AsmWriteCr3):
mov %rcx,%cr3
mov %rcx,%rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S
index 0469363..b25e178 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteCr4.S
@@ -29,8 +29,8 @@
# UINTN Cr4
# );
#------------------------------------------------------------------------------
-.global _AsmWriteCr4;
-_AsmWriteCr4:
+.global ASM_PFX(AsmWriteCr4)
+ASM_PFX(AsmWriteCr4):
mov %rcx,%cr4
mov %rcx,%rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
index 080e56a..1fd9fca 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr0.S
@@ -29,9 +29,9 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr0;
-.align 16;
-_AsmWriteDr0:
+.global ASM_PFX(AsmWriteDr0)
+.align 16
+ASM_PFX(AsmWriteDr0):
mov %rcx, %dr0
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
index c69b5e2..5d75a97 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr1.S
@@ -29,9 +29,9 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr1;
-.align 16;
-_AsmWriteDr1:
+.global ASM_PFX(AsmWriteDr1)
+.align 16
+ASM_PFX(AsmWriteDr1):
mov %rcx, %dr1
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
index ee4b669..bdbaa09 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr2.S
@@ -29,9 +29,9 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr2;
-.align 16;
-_AsmWriteDr2:
+.global ASM_PFX(AsmWriteDr2)
+.align 16
+ASM_PFX(AsmWriteDr2):
mov %rcx, %dr2
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
index bcda6c3..555284e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr3.S
@@ -29,9 +29,9 @@
# UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr3;
-.align 16;
-_AsmWriteDr3:
+.global ASM_PFX(AsmWriteDr3)
+.align 16
+ASM_PFX(AsmWriteDr3):
mov %rcx, %dr3
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S
index b6b4e78..116aef9 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr4.S
@@ -29,8 +29,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr4;
-_AsmWriteDr4:
+.global ASM_PFX(AsmWriteDr4)
+ASM_PFX(AsmWriteDr4):
mov %rcx, %dr4
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S
index 7539095..ccd7d20 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr5.S
@@ -29,8 +29,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr5;
-_AsmWriteDr5:
+.global ASM_PFX(AsmWriteDr5)
+ASM_PFX(AsmWriteDr5):
mov %rcx, %dr5
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S
index 8627260..b4dddee 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr6.S
@@ -29,8 +29,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr6;
-_AsmWriteDr6:
+.global ASM_PFX(AsmWriteDr6)
+ASM_PFX(AsmWriteDr6):
mov %rcx, %dr6
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S
index 8699d95..466fdef 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteDr7.S
@@ -29,8 +29,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteDr7;
-_AsmWriteDr7:
+.global ASM_PFX(AsmWriteDr7)
+ASM_PFX(AsmWriteDr7):
mov %rcx, %dr7
mov %rcx, %rax
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S
index 1e9d84b..d816df5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteGdtr.S
@@ -29,7 +29,7 @@
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global _InternalX86WriteGdtr;
-_InternalX86WriteGdtr:
+.global ASM_PFX(InternalX86WriteGdtr)
+ASM_PFX(InternalX86WriteGdtr):
lgdt (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S
index feb085f..d3b9018 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteIdtr.S
@@ -29,8 +29,8 @@
# IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global _InternalX86WriteIdtr;
-.align 16;
-_InternalX86WriteIdtr:
+.global ASM_PFX(InternalX86WriteIdtr)
+.align 16
+ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S
index c07ab83..416eb74 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteLdtr.S
@@ -29,8 +29,8 @@
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
-.global _AsmWriteLdtr;
-.align 16;
-_AsmWriteLdtr:
+.global ASM_PFX(AsmWriteLdtr);
+.align 16
+ASM_PFX(AsmWriteLdtr):
lldt %cx
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S
index 2d805a1..a40aedf 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm0.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm0;
-_AsmWriteMm0:
+.global ASM_PFX(AsmWriteMm0);
+ASM_PFX(AsmWriteMm0):
movd %rcx, %xmm0
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S
index ff8162e..8b10e3f 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm1.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm1;
-_AsmWriteMm1:
+.global ASM_PFX(AsmWriteMm1);
+ASM_PFX(AsmWriteMm1):
movd %rcx, %mm1
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S
index a98e736..818bb0c 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm2.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm2;
-_AsmWriteMm2:
+.global ASM_PFX(AsmWriteMm2)
+ASM_PFX(AsmWriteMm2):
movd %rcx, %mm2
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S
index 81561e3..c5747e8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm3.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm3;
-_AsmWriteMm3:
+.global ASM_PFX(AsmWriteMm3)
+ASM_PFX(AsmWriteMm3):
movd %rcx, %mm3
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S
index 124d946..fdeb1eb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm4.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm4;
-_AsmWriteMm4:
+.global ASM_PFX(AsmWriteMm4)
+ASM_PFX(AsmWriteMm4):
movd %rcx, %mm4
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S
index 0935ddc..78d4fcb 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm5.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm5;
-_AsmWriteMm5:
+.global ASM_PFX(AsmWriteMm5)
+ASM_PFX(AsmWriteMm5):
movd %rcx, %mm5
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S
index 02b50cf..31bb40d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm6.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm6;
-_AsmWriteMm6:
+.global ASM_PFX(AsmWriteMm6)
+ASM_PFX(AsmWriteMm6):
movd %rcx, %mm6
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S
index 6029272..cf4777b 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMm7.S
@@ -29,7 +29,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global _AsmWriteMm7;
-_AsmWriteMm7:
+.global ASM_PFX(AsmWriteMm7)
+ASM_PFX(AsmWriteMm7):
movd %rcx, %mm7
ret
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
index 88ff48b..2b0a557 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/WriteMsr64.S
@@ -31,9 +31,9 @@
# );
# TODO:
#------------------------------------------------------------------------------
-.global _AsmWriteMsr64;
-.align 16;
-_AsmWriteMsr64:
+.global ASM_PFX(AsmWriteMsr64)
+.align 16
+ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax
shr $0x20, %rdx
wrmsr
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
index 725367b..2b1014a 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CompareMem.S
@@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemCompareMem
+.globl ASM_PFX(InternalMemCompareMem)
#------------------------------------------------------------------------------
# INTN
@@ -38,7 +38,7 @@
# IN UINTN Length
# );
#------------------------------------------------------------------------------
-_InternalMemCompareMem:
+ASM_PFX(InternalMemCompareMem):
push %esi
push %edi
movl 12(%esp), %esi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
index a95b337..40274c5 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/CopyMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemCopyMem
+.globl ASM_PFX(InternalMemCopyMem)
#------------------------------------------------------------------------------
# VOID *
@@ -32,7 +32,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMemCopyMem:
+ASM_PFX(InternalMemCopyMem):
push %esi
push %edi
movl 16(%esp), %esi # esi <- Source
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
index 5e65b96..e944052 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem16.S
@@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemScanMem16
+.globl ASM_PFX(InternalMemScanMem16)
#------------------------------------------------------------------------------
# CONST VOID *
@@ -38,7 +38,7 @@
# IN UINT16 Value
# );
#------------------------------------------------------------------------------
-_InternalMemScanMem16:
+ASM_PFX(InternalMemScanMem16):
push %edi
movl 12(%esp), %ecx
movl 8(%esp), %edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
index 5d46ed2..00461db 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem32.S
@@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemScanMem32
+.globl ASM_PFX(InternalMemScanMem32)
#------------------------------------------------------------------------------
# CONST VOID *
@@ -38,7 +38,7 @@
# IN UINT32 Value
# );
#------------------------------------------------------------------------------
-_InternalMemScanMem32:
+ASM_PFX(InternalMemScanMem32):
push %edi
movl 12(%esp), %ecx
movl 8(%esp), %edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
index 3ba6965..2e5c6ee 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem64.S
@@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemScanMem64
+.globl ASM_PFX(InternalMemScanMem64)
#------------------------------------------------------------------------------
# CONST VOID *
@@ -38,7 +38,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-_InternalMemScanMem64:
+ASM_PFX(InternalMemScanMem64):
push %edi
movl 12(%esp), %ecx
movl 16(%esp), %eax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
index 7a834a5..36f88bf 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ScanMem8.S
@@ -27,7 +27,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemScanMem8
+.globl ASM_PFX(InternalMemScanMem8)
#------------------------------------------------------------------------------
# CONST VOID *
@@ -38,7 +38,7 @@
# IN UINT8 Value
# );
#------------------------------------------------------------------------------
-_InternalMemScanMem8:
+ASM_PFX(InternalMemScanMem8):
push %edi
movl 12(%esp), %ecx
movl 8(%esp), %edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
index 4ddf6c4..5b438c8 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem.S
@@ -24,7 +24,7 @@
.386:
.code:
-.globl _InternalMemSetMem
+.globl ASM_PFX(InternalMemSetMem)
#------------------------------------------------------------------------------
# VOID *
@@ -34,7 +34,7 @@
# IN UINT8 Value
# )
#------------------------------------------------------------------------------
-_InternalMemSetMem:
+ASM_PFX(InternalMemSetMem):
push %edi
movl 16(%esp),%eax
movl 8(%esp),%edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
index 6e7c136..8600051 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem16.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemSetMem16
+.globl ASM_PFX(InternalMemSetMem16)
#------------------------------------------------------------------------------
# VOID *
@@ -31,7 +31,7 @@
# IN UINT16 Value
# )
#------------------------------------------------------------------------------
-_InternalMemSetMem16:
+ASM_PFX(InternalMemSetMem16):
push %edi
movl 16(%esp), %eax
movl 8(%esp), %edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
index 455af20..e75bf4d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemSetMem32
+.globl ASM_PFX(InternalMemSetMem32)
#------------------------------------------------------------------------------
# VOID *
@@ -31,7 +31,7 @@
# IN UINT32 Value
# )
#------------------------------------------------------------------------------
-_InternalMemSetMem32:
+ASM_PFX(InternalMemSetMem32):
push %edi
movl 16(%esp),%eax
movl 8(%esp),%edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
index b4afff0..3405819 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/SetMem64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemSetMem64
+.globl ASM_PFX(InternalMemSetMem64)
#------------------------------------------------------------------------------
# VOID *
@@ -31,7 +31,7 @@
# IN UINT64 Value
# )
#------------------------------------------------------------------------------
-_InternalMemSetMem64:
+ASM_PFX(InternalMemSetMem64):
push %edi
movl 12(%esp), %ecx
movl 16(%esp), %eax
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
index 8465d7c..19472c2 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ia32/ZeroMem.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMemZeroMem
+.globl ASM_PFX(InternalMemZeroMem)
#------------------------------------------------------------------------------
# VOID *
@@ -30,7 +30,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMemZeroMem:
+ASM_PFX(InternalMemZeroMem)
push %edi
xorl %eax,%eax
movl 8(%esp),%edi
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
index 1498a5d..f342ca6 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CompareMem.S
@@ -41,8 +41,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemCompareMem
-_InternalMemCompareMem:
+.globl ASM_PFX(InternalMemCompareMem)
+ASM_PFX(InternalMemCompareMem):
push rsi
push rdi
mov rsi, rcx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
index fe67040..a18f50e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/CopyMem.S
@@ -35,8 +35,8 @@
# )
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemCopyMem
-_InternalMemCopyMem:
+.globl ASM_PFX(InternalMemCopyMem)
+ASM_PFX(InternalMemCopyMem)
push rsi
push rdi
mov rsi, rdx # rsi <- Source
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
index 018d298..f154cdc 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem16.S
@@ -41,8 +41,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemScanMem16
-_InternalMemScanMem16:
+.globl ASM_PFX(InternalMemScanMem16)
+ASM_PFX(InternalMemScanMem16):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
index a253b9b..7846264 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem32.S
@@ -41,8 +41,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemScanMem32
-_InternalMemScanMem32:
+.globl ASM_PFX(InternalMemScanMem32)
+ASM_PFX(InternalMemScanMem32):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
index 528f813..8d771f1 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem64.S
@@ -41,8 +41,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemScanMem64
-_InternalMemScanMem64:
+.globl ASM_PFX(InternalMemScanMem64)
+ASM_PFX(InternalMemScanMem64):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
index 84610eb..e43bb67 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.S
@@ -41,8 +41,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemScanMem8
-_InternalMemScanMem8:
+.globl ASM_PFX(InternalMemScanMem8)
+ASM_PFX(InternalMemScanMem8):
push rdi
mov rdi, rcx
mov rcx, rdx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
index d9f8b06..dd6189d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem.S
@@ -35,8 +35,8 @@
# )
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemSetMem
-_InternalMemSetMem:
+.globl ASM_PFX(InternalMemSetMem)
+ASM_PFX(InternalMemSetMem):
push rdi
mov rax, r8 # rax = Value
mov rdi, rcx # rdi = Buffer
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
index 5f19646..9b6d4ce 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem16.S
@@ -35,8 +35,8 @@
# )
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemSetMem16
-_InternalMemSetMem16:
+.globl ASM_PFX(InternalMemSetMem16)
+ASM_PFX(InternalMemSetMem16):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
index 72243ae..124273d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem32.S
@@ -35,8 +35,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemSetMem32
-_InternalMemSetMem32:
+.globl ASM_PFX(InternalMemSetMem32)
+ASM_PFX(InternalMemSetMem32):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
index a8a4a0b..a720f0e 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/SetMem64.S
@@ -34,8 +34,8 @@
# )
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemSetMem64
-_InternalMemSetMem64:
+.globl ASM_PFX(InternalMemSetMem64)
+ASM_PFX(InternalMemSetMem64):
push rdi
mov rdi, rcx
mov rax, r8
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
index 6233b06..b571ef3 100644
--- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
+++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ZeroMem.S
@@ -33,8 +33,8 @@
# );
#------------------------------------------------------------------------------
.intel_syntax
-.globl _InternalMemZeroMem
-_InternalMemZeroMem:
+.globl ASM_PFX(InternalMemZeroMem)
+ASM_PFX(InternalMemZeroMem):
push rdi
push rcx
xor rax, rax