]> granicus.if.org Git - libvpx/commitdiff
Catch all elf formats
authorJohann <johannkoenig@google.com>
Tue, 28 Jul 2015 21:40:44 +0000 (14:40 -0700)
committerJohann <johannkoenig@google.com>
Fri, 7 Aug 2015 23:42:53 +0000 (16:42 -0700)
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

third_party/x86inc/README.libvpx
third_party/x86inc/x86inc.asm.new

index eb5211583037bf735d443e83d1e9e9ce12722d94..629cecea7854f59cd57f50d30d74d19a6f0ec9fc 100644 (file)
@@ -13,3 +13,4 @@ Prefix functions with vpx by default.
 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.
index 0c7e5b4ceb3ad52dbc9cc54c6a90c261a1b89a2e..b38ae9ef0c8df50f01feab6f52997b66c9ada24c 100644 (file)
@@ -687,7 +687,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
         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
@@ -720,7 +722,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
 
 %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
@@ -730,7 +734,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
 
 ; 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