From: Sam Hocevar Date: Sat, 4 Mar 2006 02:49:44 +0000 (+0000) Subject: * common/i386/i386inc.asm: got PIC to work for real on OS X x86. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4fe3aff6fd991a72b8a80b2157092678b13db433;p=libx264 * common/i386/i386inc.asm: got PIC to work for real on OS X x86. git-svn-id: svn://svn.videolan.org/x264/trunk@452 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/i386/i386inc.asm b/common/i386/i386inc.asm index 888fdab5..3830a6b5 100644 --- a/common/i386/i386inc.asm +++ b/common/i386/i386inc.asm @@ -42,6 +42,7 @@ BITS 32 %macro SECTION_RODATA 0 %ifidn __OUTPUT_FORMAT__,macho SECTION .text + fakegot: %else SECTION .rodata data align=16 %endif @@ -82,15 +83,15 @@ BITS 32 %ifidn __OUTPUT_FORMAT__,macho ; There is no real global offset table on OS X, but we still ; need to reference our variables by offset. - %define GOT_eax + eax - %define GOT_ebx + ebx - %define GOT_ecx + ecx - %define GOT_edx + edx + %define GOT_eax - fakegot + eax + %define GOT_ebx - fakegot + ebx + %define GOT_ecx - fakegot + ecx + %define GOT_edx - fakegot + edx %macro picgetgot 1 call %%getgot %%getgot: pop %1 - sub %1, %%getgot + add %1, $$ - %%getgot %endmacro %else %ifidn __OUTPUT_FORMAT__,elf