avcodec/ppc/asm: fix build with ABI v2
authorThierry FAUCK <thierry@linux.vnet.ibm.com>
Mon, 19 May 2014 20:03:28 +0000 (22:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 19 May 2014 20:10:01 +0000 (22:10 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ppc/asm.S

index bbbf8a4..b57de2e 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 \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