Commit 52f6e28e authored by Rafael Ávila de Espíndola's avatar Rafael Ávila de Espíndola
Browse files

Fix build with xcode4 and simplify GLOBAL.

Without this change I get link errors in firefox's libxul. It looks
like the linker expect a particular pattern for getting the GOT. This
patch changes webm to use the same pattern used by the compiler.

Change-Id: Iea8c2e134ad45c1dc7d221ff885a8429bfa4e057
parent 3788b356
...@@ -168,15 +168,10 @@ ...@@ -168,15 +168,10 @@
%macro GET_GOT 1 %macro GET_GOT 1
push %1 push %1
call %%get_got call %%get_got
%%sub_offset:
jmp %%exitGG
%%get_got: %%get_got:
mov %1, [esp] pop %1
add %1, fake_got - %%sub_offset
ret
%%exitGG:
%undef GLOBAL %undef GLOBAL
%define GLOBAL(x) x + %1 - fake_got %define GLOBAL(x) x + %1 - %%get_got
%undef RESTORE_GOT %undef RESTORE_GOT
%define RESTORE_GOT pop %1 %define RESTORE_GOT pop %1
%endmacro %endmacro
...@@ -289,7 +284,6 @@ ...@@ -289,7 +284,6 @@
%elifidn __OUTPUT_FORMAT__,macho32 %elifidn __OUTPUT_FORMAT__,macho32
%macro SECTION_RODATA 0 %macro SECTION_RODATA 0
section .text section .text
fake_got:
%endmacro %endmacro
%else %else
%define SECTION_RODATA section .rodata %define SECTION_RODATA section .rodata
......
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