ppc: Fix compilation for ppc64le (ELFv2)
authorThierry Fauck <thierry@linux.vnet.ibm.com>
Thu, 29 May 2014 12:22:27 +0000 (15:22 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 30 May 2014 19:46:53 +0000 (22:46 +0300)
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/ppc/asm.S

index 4d4285b..141dee9 100644 (file)
 
 .macro extfunc name
     .global X(\name)
+#if _CALL_ELF == 2
+    .text
+X(\name):
+    addis %r2, %r12, .TOC.-X(\name)@ha
+    addi %r2, %r2, .TOC.-X(\name)@l
+    .localentry X(\name), .-X(\name)
+#else
     .section .opd, "aw"
 X(\name):
     .quad L(\name), .TOC.@tocbase, 0
     .previous
     .type X(\name), STT_FUNC
 L(\name):
+#endif
 .endm
 
 .macro movrel rd, sym, gp