summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/X64
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Include/X64')
-rw-r--r--MdePkg/Include/X64/ProcessorBind.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h
index 363a2dca35..027d8d0f59 100644
--- a/MdePkg/Include/X64/ProcessorBind.h
+++ b/MdePkg/Include/X64/ProcessorBind.h
@@ -400,11 +400,18 @@ typedef INT64 INTN;
// For symbol name in GNU assembly code, an extra "_" is necessary
//
#if defined(__GNUC__)
- #if defined(linux)
- #define ASM_PFX(name) name
- #else
- #define ASM_PFX(name) _##name
- #endif
+ ///
+ /// Private worker functions for ASM_PFX()
+ ///
+ #define _CONCATENATE(a, b) __CONCATENATE(a, b)
+ #define __CONCATENATE(a, b) a ## b
+
+ ///
+ /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
+ /// on symbols in assembly language.
+ ///
+ #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
+
///
/// For GNU assembly code, .global or .globl can declare global symbols.
/// Define this macro to unify the usage.