]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h
redefine the ASM_PFX to let it can work on Apple/NetBSD and other Unix* platform.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Include / X64 / EfiBind.h
index 273490eecae8b89520bf955142b35c569b90029c..a0ab02b83882b70faa9a7af8e1fdce753d916da4 100644 (file)
@@ -262,11 +262,18 @@ typedef int64_t   intn_t;
 // For symbol name in GNU assembly code, an extra "_" is necessary\r
 //\r
 #if defined(__GNUC__)\r
-  #if defined(linux)\r
-    #define ASM_PFX(name) name\r
-  #else\r
-    #define ASM_PFX(name) _##name\r
-  #endif \r
+  ///\r
+  /// Private worker functions for ASM_PFX()\r
+  ///\r
+  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)\r
+  #define __CONCATENATE(a, b) a ## b\r
+\r
+  ///\r
+  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix\r
+  /// on symbols in assembly language.\r
+  ///\r
+  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)\r
+\r
 #endif\r
 \r
 #endif\r