From 34fb994d9340313b0d247899a4a7a97cc010df92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 29 May 2014 14:37:31 +0300 Subject: [PATCH 1/2] aarch64: Use the correct syntax for relocations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes building in PIC mode with gas. The examples in the gas manual showed using a # here even though gas itself actually didn't support that syntax (and the gas test suite only tests it without the extra hash sign). CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit 08cd92144e73195eecc28ed0348e66e255516b82) Signed-off-by: Martin Storsjö --- libavutil/aarch64/asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S index 94e5a84583..66084726a6 100644 --- a/libavutil/aarch64/asm.S +++ b/libavutil/aarch64/asm.S @@ -55,8 +55,8 @@ ELF .size \name, . - \name .macro movrel rd, val #if CONFIG_PIC - adrp \rd, #:pg_hi21:\val - add \rd, \rd, #:lo12:\val + adrp \rd, :pg_hi21:\val + add \rd, \rd, :lo12:\val #else ldr \rd, =\val #endif From 0ec75a04e5fc714bc3cd6e2a6b783e6df834ad01 Mon Sep 17 00:00:00 2001 From: Thierry Fauck Date: Thu, 29 May 2014 15:22:27 +0300 Subject: [PATCH 2/2] ppc: Fix compilation for ppc64le (ELFv2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC: libav-stable@libav.org Signed-off-by: Martin Storsjö (cherry picked from commit d6d767d93e532246cacf3567e6bcad76a821f838) Signed-off-by: Martin Storsjö --- libavcodec/ppc/asm.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/ppc/asm.S b/libavcodec/ppc/asm.S index 4d4285b6d3..141dee9b78 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.@tocbase, 0 .previous .type X(\name), STT_FUNC L(\name): +#endif .endm .macro movrel rd, sym, gp