Commit 5d5c5cc2 authored by Sam Hocevar's avatar Sam Hocevar
Browse files

* common/i386/i386inc.asm: support for ELF, a.out and Mach-O objects.


git-svn-id: svn://svn.videolan.org/x264/trunk@424 df754926-b1dd-0310-bc7b-ec298dee348c
parent 78d31c22
......@@ -66,15 +66,32 @@ BITS 32
; mov eax, [esp + 12]
;
%ifdef __PIC__
extern _GLOBAL_OFFSET_TABLE_
; FIXME: find an elegant way to use registers other than ebx
%define GLOBAL + ebx wrt ..gotoff
%macro picgetgot 1
call %%getgot
%%getgot:
pop %1
add %1, _GLOBAL_OFFSET_TABLE_ + $$ - %%getgot wrt ..gotpc
%endmacro
%ifdef FORMAT_MACHO
; There is no real global offset table on OS X, but we still
; need to reference our variables by offset.
%define GLOBAL + ebx
%macro picgetgot 1
call %%getgot
%%getgot:
pop %1
sub %1, %%getgot
%endmacro
%else
%ifdef FORMAT_ELF
%define GOT _GLOBAL_OFFSET_TABLE_
%else ; for a.out
%define GOT __GLOBAL_OFFSET_TABLE_
%endif
extern GOT
; FIXME: find an elegant way to use registers other than ebx
%define GLOBAL + ebx wrt ..gotoff
%macro picgetgot 1
call %%getgot
%%getgot:
pop %1
add %1, GOT + $$ - %%getgot wrt ..gotpc
%endmacro
%endif
%macro picpush 1
push %1
%endmacro
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment