[libav-stable] ppc: Fix compilation for ppc64le (ELFv2)

Thierry Fauck git at libav.org
Fri May 30 21:53:13 CEST 2014


Module: libav
Branch: master
Commit: d6d767d93e532246cacf3567e6bcad76a821f838

Author:    Thierry Fauck <thierry at linux.vnet.ibm.com>
Committer: Martin Storsjö <martin at martin.st>
Date:      Thu May 29 15:22:27 2014 +0300

ppc: Fix compilation for ppc64le (ELFv2)

CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavcodec/ppc/asm.S |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S
index 4d4285b..141dee9 100644
--- a/libavcodec/ppc/asm.S
+++ b/libavcodec/ppc/asm.S
@@ -36,12 +36,20 @@
 
 .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. at tocbase, 0
     .previous
     .type X(\name), STT_FUNC
 L(\name):
+#endif
 .endm
 
 .macro movrel rd, sym, gp



More information about the libav-stable mailing list