]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/Thunk16.S
Use ASM_PFX to optionnaly set the underscore prefix
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / Thunk16.S
index 2641556d98e205698c2edc65e7e85b8e079e7339..c45cdb0a2d6598a80971c7eacdc9dc72f58b41d2 100644 (file)
 #\r
 #------------------------------------------------------------------------------\r
 \r
-.globl _m16Start, _m16Size, _mThunk16Attr, _m16Gdt, _m16GdtrBase, _mTransition\r
-.globl _InternalAsmThunk16\r
+.globl ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)\r
+.globl ASM_PFX(InternalAsmThunk16)\r
 \r
-_m16Start:\r
+ASM_PFX(m16Start):\r
 \r
 SavedGdt:     .space  6\r
 \r
-_BackFromUserCode:\r
+ASM_PFX(BackFromUserCode):\r
     push    %ss\r
     push    %cs\r
     .byte   0x66\r
@@ -40,7 +40,7 @@ L_Base1:
     push    %ds\r
     pushaw                              # pushad actually\r
     .byte   0x66, 0xba                  # mov edx, imm32\r
-_ThunkAttr: .space  4\r
+ASM_PFX(ThunkAttr): .space  4\r
     testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl\r
     jz      1f\r
     movl    $0x15cd2401, %eax           # mov ax, 2401h & int 15h\r
@@ -74,14 +74,14 @@ SavedEsp:   .space  4
     .byte   0x66\r
     lret                                # return to protected mode\r
 \r
-_EntryPoint:    .long      _ToUserCode - _m16Start\r
+_EntryPoint:    .long      ASM_PFX(ToUserCode) - ASM_PFX(m16Start)\r
                 .word      0x8\r
 _16Idtr:        .word      0x3ff\r
                 .long      0\r
 _16Gdtr:        .word      GdtEnd - _NullSegDesc - 1\r
-_16GdtrBase:    .long     _NullSegDesc\r
+_16GdtrBase:    .long      _NullSegDesc\r
 \r
-_ToUserCode:\r
+ASM_PFX(ToUserCode):\r
     movl    %ss, %edx\r
     movl    %ecx, %ss                   # set new segment selectors\r
     movl    %ecx, %ds\r
@@ -136,7 +136,7 @@ GdtEnd:
 #   @param  Transition  Pointer to the transition code\r
 #   @return The address of the 16-bit stack after returning from user code\r
 #\r
-_InternalAsmThunk16:\r
+ASM_PFX(InternalAsmThunk16):\r
     push    %ebp\r
     push    %ebx\r
     push    %esi\r
@@ -193,8 +193,8 @@ _InternalAsmThunk16:
 \r
     .const:\r
 \r
-_m16Size:        .word      _InternalAsmThunk16 - _m16Start\r
-_mThunk16Attr:   .word      _ThunkAttr          - _m16Start\r
-_m16Gdt:         .word      _NullSegDesc        - _m16Start\r
-_m16GdtrBase:    .word      _16GdtrBase         - _m16Start\r
-_mTransition:    .word      _EntryPoint         - _m16Start\r
+ASM_PFX(m16Size):        .word      _InternalAsmThunk16 - ASM_PFX(m16Start)\r
+ASM_PFX(mThunk16Attr):   .word      _ThunkAttr          - ASM_PFX(m16Start)\r
+ASM_PFX(m16Gdt):         .word      _NullSegDesc        - ASM_PFX(m16Start)\r
+ASM_PFX(m16GdtrBase):    .word      _16GdtrBase         - ASM_PFX(m16Start)\r
+ASM_PFX(mTransition):    .word      _EntryPoint         - ASM_PFX(m16Start)\r