mirror of https://github.com/acidanthera/audk.git
MdePkg Base.h: Always define ASM_PFX
Some compilers may define __USER_LABEL_PREFIX__ to determine the prefix used with ASM_PFX. Otherwise, IA32 will use a single underscore '_' character, and all other architectures will use an empty prefix. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16019 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b3f9cdaebb
commit
02eef55311
|
@ -139,4 +139,8 @@ typedef INT64 INTN;
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -158,6 +158,10 @@ typedef INT32 INTN;
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -79,21 +79,20 @@ VERIFY_SIZE_OF (CHAR16, 2);
|
|||
#endif
|
||||
|
||||
//
|
||||
// For symbol name in GNU assembly code, an extra "_" is necessary
|
||||
// For symbol name in assembly code, an extra "_" is sometimes necessary
|
||||
//
|
||||
#if defined(__GNUC__)
|
||||
///
|
||||
/// 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
|
||||
///
|
||||
/// 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)
|
||||
|
||||
#if __APPLE__
|
||||
//
|
||||
|
|
|
@ -138,5 +138,9 @@ typedef unsigned long UINTN;
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -284,5 +284,9 @@ typedef INT32 INTN;
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__ _
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -305,5 +305,9 @@ typedef struct {
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(((EFI_PLABEL *)(FunctionPointer))->EntryPoint)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -290,5 +290,9 @@ typedef INT64 INTN;
|
|||
**/
|
||||
#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue