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@9073 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-08-14 09:39:55 +00:00
parent 02c9c47027
commit d4cf6b6c97
2 changed files with 24 additions and 10 deletions

View File

@ -336,11 +336,18 @@ typedef INT32 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.

View File

@ -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.