Use .text instead of .rodata on macho
The read only sections are getting stripped on some OS X builds. As a result, random data is used in place of the intended tables. Change-Id: I58c18a53e503f093ee268451698c5761e6c32540
This commit is contained in:
parent
e15b535791
commit
c7e9e486b8
1
third_party/x86inc/README.libvpx
vendored
1
third_party/x86inc/README.libvpx
vendored
@ -17,3 +17,4 @@ Catch all elf formats for 'hidden' status and SECTION notes.
|
|||||||
Avoid 'amdnop' when building with nasm.
|
Avoid 'amdnop' when building with nasm.
|
||||||
Set 'private_extern' visibility for macho targets.
|
Set 'private_extern' visibility for macho targets.
|
||||||
Copy PIC 'GLOBAL' macros from x86_abi_support.asm
|
Copy PIC 'GLOBAL' macros from x86_abi_support.asm
|
||||||
|
Use .text instead of .rodata on macho to avoid broken tables in PIC mode.
|
||||||
|
12
third_party/x86inc/x86inc.asm.new
vendored
12
third_party/x86inc/x86inc.asm.new
vendored
@ -78,8 +78,18 @@
|
|||||||
%define mangle(x) _ %+ x
|
%define mangle(x) _ %+ x
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
; In some instances macho32 tables get misaligned when using .rodata.
|
||||||
|
; When looking at the disassembly it appears that the offset is either
|
||||||
|
; correct or consistently off by 90. Placing them in the .text section
|
||||||
|
; works around the issue. It appears to be specific to the way libvpx
|
||||||
|
; handles the tables.
|
||||||
%macro SECTION_RODATA 0-1 16
|
%macro SECTION_RODATA 0-1 16
|
||||||
SECTION .rodata align=%1
|
%ifidn __OUTPUT_FORMAT__,macho32
|
||||||
|
SECTION .text align=%1
|
||||||
|
fakegot:
|
||||||
|
%else
|
||||||
|
SECTION .rodata align=%1
|
||||||
|
%endif
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
%macro SECTION_TEXT 0-1 16
|
%macro SECTION_TEXT 0-1 16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user