1 From 67e9e0337185f05a0d8d362473e63d8a9dfdebed Mon Sep 17 00:00:00 2001
2 From: Manoj Gupta <manojgupta@google.com>
3 Date: Thu, 27 Dec 2018 11:06:26 -0800
4 Subject: [PATCH] libavcodec: Remove dynamic relocs from h264idct_neon.S
6 Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
8 movrel x14, X(ff_h264_idct_add_neon)
10 Linker cannot resolve them fully at link time and emits GOT
12 Use explicit labels instead so that no dynamic relocations are
16 TEST=lld complains are fixed.
18 Change-Id: Ie533a10aab1fe3834300599ce650d3673a674f4e
19 Reviewed-on: https://chromium-review.googlesource.com/c/1390286
20 Reviewed-by: Frank Liberato <liberato@chromium.org>
22 libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
23 1 file changed, 12 insertions(+), 8 deletions(-)
25 diff --git a/src/third_party/ffmpeg/libavcodec/aarch64/h264idct_neon.S b/src/third_party/ffmpeg/libavcodec/aarch64/h264idct_neon.S
26 index 825ec49f8c6d..7de44205d39a 100644
27 --- a/src/third_party/ffmpeg/libavcodec/aarch64/h264idct_neon.S
28 +++ b/src/third_party/ffmpeg/libavcodec/aarch64/h264idct_neon.S
32 function ff_h264_idct_add_neon, export=1
33 +.L_ff_h264_idct_add_neon:
34 ld1 {v0.4H, v1.4H, v2.4H, v3.4H}, [x1]
37 @@ -77,6 +78,7 @@ function ff_h264_idct_add_neon, export=1
40 function ff_h264_idct_dc_add_neon, export=1
41 +.L_ff_h264_idct_dc_add_neon:
45 @@ -106,8 +108,8 @@ function ff_h264_idct_add16_neon, export=1
49 - movrel x13, X(ff_h264_idct_dc_add_neon)
50 - movrel x14, X(ff_h264_idct_add_neon)
51 + movrel x13, .L_ff_h264_idct_dc_add_neon
52 + movrel x14, .L_ff_h264_idct_add_neon
56 @@ -133,8 +135,8 @@ function ff_h264_idct_add16intra_neon, export=1
60 - movrel x13, X(ff_h264_idct_dc_add_neon)
61 - movrel x14, X(ff_h264_idct_add_neon)
62 + movrel x13, .L_ff_h264_idct_dc_add_neon
63 + movrel x14, .L_ff_h264_idct_add_neon
67 @@ -160,8 +162,8 @@ function ff_h264_idct_add8_neon, export=1
68 add x5, x1, #16*4 // block_offset
69 add x9, x2, #16*32 // block
71 - movrel x13, X(ff_h264_idct_dc_add_neon)
72 - movrel x14, X(ff_h264_idct_add_neon)
73 + movrel x13, .L_ff_h264_idct_dc_add_neon
74 + movrel x14, .L_ff_h264_idct_add_neon
78 @@ -263,6 +265,7 @@ endfunc
81 function ff_h264_idct8_add_neon, export=1
82 +.L_ff_h264_idct8_add_neon:
85 ld1 {v24.8H, v25.8H}, [x1]
86 @@ -326,6 +329,7 @@ function ff_h264_idct8_add_neon, export=1
89 function ff_h264_idct8_dc_add_neon, export=1
90 +.L_ff_h264_idct8_dc_add_neon:
94 @@ -375,8 +379,8 @@ function ff_h264_idct8_add4_neon, export=1
98 - movrel x13, X(ff_h264_idct8_dc_add_neon)
99 - movrel x14, X(ff_h264_idct8_add_neon)
100 + movrel x13, .L_ff_h264_idct8_dc_add_neon
101 + movrel x14, .L_ff_h264_idct8_add_neon
104 ldrb w9, [x4, w9, UXTW]