diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-14 09:41:23 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-14 09:41:23 +0000 |
commit | c113cd3272b5cde2f79a88ac5895e607ba2852e2 (patch) | |
tree | ed06f26efb09d5deb039fb55103097944979b44c /EdkCompatibilityPkg | |
parent | d4cf6b6c976d07af769ad3bfeeccbcf833e72c32 (diff) | |
download | edk2-platforms-c113cd3272b5cde2f79a88ac5895e607ba2852e2.tar.xz |
redefine the ASM_PFX to let it can work on Apple/NetBSD and other Unix* platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9074 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h | 17 | ||||
-rw-r--r-- | EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h | 17 |
2 files changed, 24 insertions, 10 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index 0f5b220731..5cfbb74131 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -310,11 +310,18 @@ typedef int32_t intn_t; // 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)
+
#endif
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h index 273490eeca..a0ab02b838 100644 --- a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h @@ -262,11 +262,18 @@ typedef int64_t intn_t; // 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)
+
#endif
#endif
|