chromium: fix launcher for halibut
[AGL/meta-agl-devel.git] / meta-html5-framework / recipes-wam / chromium / chromium68 / 0001-libavcodec-Remove-dynamic-relocs-from-h264idct_neon..patch
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
5
6 Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
7 has code like:
8     movrel          x14, X(ff_h264_idct_add_neon)
9
10 Linker cannot resolve them fully at link time and emits GOT
11 relocations.
12 Use explicit labels instead so that no dynamic relocations are
13 needed at all.
14
15 BUG=chromium:917919
16 TEST=lld complains are fixed.
17
18 Change-Id: Ie533a10aab1fe3834300599ce650d3673a674f4e
19 Reviewed-on: https://chromium-review.googlesource.com/c/1390286
20 Reviewed-by: Frank Liberato <liberato@chromium.org>
21 ---
22  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
23  1 file changed, 12 insertions(+), 8 deletions(-)
24
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
29 @@ -23,6 +23,7 @@
30  #include "neon.S"
31  
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]
35          sxtw            x2,     w2
36          movi            v30.8H, #0
37 @@ -77,6 +78,7 @@ function ff_h264_idct_add_neon, export=1
38  endfunc
39  
40  function ff_h264_idct_dc_add_neon, export=1
41 +.L_ff_h264_idct_dc_add_neon:
42          sxtw            x2,  w2
43          mov             w3,       #0
44          ld1r            {v2.8H},  [x1]
45 @@ -106,8 +108,8 @@ function ff_h264_idct_add16_neon, export=1
46          mov             w9,  w3         // stride
47          movrel          x7,  scan8
48          mov             x10, #16
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
53  1:      mov             w2,  w9
54          ldrb            w3,  [x7], #1
55          ldrsw           x0,  [x5], #4
56 @@ -133,8 +135,8 @@ function ff_h264_idct_add16intra_neon, export=1
57          mov             w9,  w3         // stride
58          movrel          x7,  scan8
59          mov             x10, #16
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
64  1:      mov             w2,  w9
65          ldrb            w3,  [x7], #1
66          ldrsw           x0,  [x5], #4
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
70          mov             w19, w3                 // stride
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
75          movrel          x7,  scan8, 16
76          mov             x10, #0
77          mov             x11, #16
78 @@ -263,6 +265,7 @@ endfunc
79  .endm
80  
81  function ff_h264_idct8_add_neon, export=1
82 +.L_ff_h264_idct8_add_neon:
83          movi            v19.8H,   #0
84          sxtw            x2,       w2
85          ld1             {v24.8H, v25.8H}, [x1]
86 @@ -326,6 +329,7 @@ function ff_h264_idct8_add_neon, export=1
87  endfunc
88  
89  function ff_h264_idct8_dc_add_neon, export=1
90 +.L_ff_h264_idct8_dc_add_neon:
91          mov             w3,       #0
92          sxtw            x2,       w2
93          ld1r            {v31.8H}, [x1]
94 @@ -375,8 +379,8 @@ function ff_h264_idct8_add4_neon, export=1
95          mov             w2,  w3
96          movrel          x7,  scan8
97          mov             w10, #16
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
102  1:      ldrb            w9,  [x7], #4
103          ldrsw           x0,  [x5], #16
104          ldrb            w9,  [x4, w9, UXTW]
105 -- 
106 2.21.0
107