ref: 5d8f9f53d190dd54720a404612cc628ea54ad603
parent: 89ba55ed1cffee20b011a3164a73088f6e5ac223
author: Johann <[email protected]>
date: Tue Jul 28 10:40:44 EDT 2015
Catch all elf formats Make sure all variants get correct visibility and SECTION notes. libvpx only pass elf32 and elf64 to the assembler, never just elf. Change-Id: I7c36c115bf52436c9afe61985c859a2081948271
--- a/third_party/x86inc/README.libvpx
+++ b/third_party/x86inc/README.libvpx
@@ -13,3 +13,4 @@
Manage name mangling (prefixing with '_') manually because 'PREFIX' does not
exist in libvpx.
Expand PIC default to macho64 and respect CONFIG_PIC from libvpx
+Catch all elf formats for 'hidden' status and SECTION notes.
--- a/third_party/x86inc/x86inc.asm.new
+++ b/third_party/x86inc/x86inc.asm.new
@@ -687,8 +687,10 @@
CAT_XDEFINE cglobaled_, %2, 1
%endif
%xdefine current_function %2
- %ifidn __OUTPUT_FORMAT__,elf
+ %ifidn __OUTPUT_FORMAT__,elf32
global %2:function %%VISIBILITY
+ %elifidn __OUTPUT_FORMAT__,elf64
+ global %2:function %%VISIBILITY
%else
global %2
%endif
@@ -720,8 +722,10 @@
%macro const 1-2+
%xdefine %1 mangle(private_prefix %+ _ %+ %1)
- %ifidn __OUTPUT_FORMAT__,elf
+ %ifidn __OUTPUT_FORMAT__,elf32
global %1:data hidden
+ %elifidn __OUTPUT_FORMAT__,elf64
+ global %1:data hidden
%else
global %1
%endif
@@ -730,7 +734,9 @@
; This is needed for ELF, otherwise the GNU linker assumes the stack is
; executable by default.
-%ifidn __OUTPUT_FORMAT__,elf
+%ifidn __OUTPUT_FORMAT__,elf32
+SECTION .note.GNU-stack noalloc noexec nowrite progbits
+%elifidn __OUTPUT_FORMAT__,elf64
SECTION .note.GNU-stack noalloc noexec nowrite progbits
%endif