89 lines
4.1 KiB
Diff
89 lines
4.1 KiB
Diff
From 3fa21bc5ce32120e4fb488471b23b973cc21161b Mon Sep 17 00:00:00 2001
|
|
From: Hugues Fruchet <hugues.fruchet@st.com>
|
|
Date: Mon, 10 Dec 2018 15:28:20 +0100
|
|
Subject: [PATCH] Description: Fix SIGBUS on armhf when compiled with binutils
|
|
2.29 In binutils 2.29, the behavior of the ADR instruction changed so that 1
|
|
is added to the address of a Thumb function (previously nothing was added).
|
|
This allows the loaded address to be passed to a BLX instruction and the
|
|
correct mode change will occur. . So that the behavior matches in binutils
|
|
2.29 and pre-2.29: - Use .eqv to clear the function attribute from a symbol
|
|
- This allows us to always add 1 to the symbol when in Thumb mode and get the
|
|
correct result. . See:
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=21458 Thanks to Jiong Wang
|
|
for original idea to solve this.
|
|
|
|
Author: James Cowgill <jcowgill@debian.org>
|
|
Bug: https://trac.ffmpeg.org/ticket/6571
|
|
Bug-Debian: https://bugs.debian.org/870622
|
|
---
|
|
gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S | 25 +++++++++++++++--------
|
|
1 file changed, 17 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S b/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
|
|
index 4f68bdb..1857582 100644
|
|
--- a/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
|
|
+++ b/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
|
|
@@ -20,6 +20,15 @@
|
|
|
|
#include "libavutil/arm/asm.S"
|
|
|
|
+# These .eqv clear the function attribute allowing the +CONFIG_THUMB hack to
|
|
+# work on old and new binutils.
|
|
+#
|
|
+# See: https://sourceware.org/bugzilla/show_bug.cgi?id=21458
|
|
+.eqv wfa_ff_h264_idct_add_neon, X(ff_h264_idct_add_neon)
|
|
+.eqv wfa_ff_h264_idct_dc_add_neon, X(ff_h264_idct_dc_add_neon)
|
|
+.eqv wfa_ff_h264_idct8_add_neon, X(ff_h264_idct8_add_neon)
|
|
+.eqv wfa_ff_h264_idct8_dc_add_neon, X(ff_h264_idct8_dc_add_neon)
|
|
+
|
|
function ff_h264_idct_add_neon, export=1
|
|
vld1.64 {d0-d3}, [r1,:128]
|
|
vmov.i16 q15, #0
|
|
@@ -113,8 +122,8 @@ function ff_h264_idct_add16_neon, export=1
|
|
movne lr, #0
|
|
cmp lr, #0
|
|
ite ne
|
|
- adrne lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
|
|
- adreq lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
|
|
+ adrne lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
|
+ adreq lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
|
|
blx lr
|
|
2: subs ip, ip, #1
|
|
add r1, r1, #32
|
|
@@ -138,8 +147,8 @@ function ff_h264_idct_add16intra_neon, export=1
|
|
cmp r8, #0
|
|
ldrsh r8, [r1]
|
|
iteet ne
|
|
- adrne lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
|
|
- adreq lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
|
|
+ adrne lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
|
|
+ adreq lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
|
cmpeq r8, #0
|
|
blxne lr
|
|
subs ip, ip, #1
|
|
@@ -166,8 +175,8 @@ function ff_h264_idct_add8_neon, export=1
|
|
cmp r8, #0
|
|
ldrsh r8, [r1]
|
|
iteet ne
|
|
- adrne lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
|
|
- adreq lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
|
|
+ adrne lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
|
|
+ adreq lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
|
|
cmpeq r8, #0
|
|
blxne lr
|
|
add r12, r12, #1
|
|
@@ -388,8 +397,8 @@ function ff_h264_idct8_add4_neon, export=1
|
|
movne lr, #0
|
|
cmp lr, #0
|
|
ite ne
|
|
- adrne lr, X(ff_h264_idct8_dc_add_neon) + CONFIG_THUMB
|
|
- adreq lr, X(ff_h264_idct8_add_neon) + CONFIG_THUMB
|
|
+ adrne lr, wfa_ff_h264_idct8_dc_add_neon + CONFIG_THUMB
|
|
+ adreq lr, wfa_ff_h264_idct8_add_neon + CONFIG_THUMB
|
|
blx lr
|
|
2: subs r12, r12, #4
|
|
add r1, r1, #128
|
|
--
|
|
2.7.4
|
|
|