diff mbox series

[FFmpeg-devel,1/2] lavc/aarch64: fix relocation out of range error

Message ID tencent_31B8CF8ED531A72CB8B31605CD00A00D4D07@qq.com
State Accepted
Commit 378ad2f8fd7c5b5d9d1b3170282ce6b8a289ba07
Headers show
Series [FFmpeg-devel,1/2] lavc/aarch64: fix relocation out of range error | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Zhao Zhili Sept. 13, 2021, 7:24 a.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Use a temporary label instead of global function symbol for b.gt.
---
 libavcodec/aarch64/videodsp.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin Storsjö Sept. 13, 2021, 11 a.m. UTC | #1
On Mon, 13 Sep 2021, Zhao Zhili wrote:

> From: Zhao Zhili <zhilizhao@tencent.com>
>
> Use a temporary label instead of global function symbol for b.gt.
> ---
> libavcodec/aarch64/videodsp.S | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/aarch64/videodsp.S b/libavcodec/aarch64/videodsp.S
> index 24067cc2af..fe2da0658e 100644
> --- a/libavcodec/aarch64/videodsp.S
> +++ b/libavcodec/aarch64/videodsp.S
> @@ -19,10 +19,11 @@
> #include "libavutil/aarch64/asm.S"
>
> function ff_prefetch_aarch64, export=1
> +1:
>         subs            w2,  w2,  #2
>         prfm            pldl1strm, [x0]
>         prfm            pldl1strm, [x0,  x1]
>         add             x0,  x0,  x1,  lsl #1
> -        b.gt            X(ff_prefetch_aarch64)
> +        b.gt            1b
>         ret
> endfunc
> -- 
> 2.31.1

LGTM

Although it would be quite interesting to know how you end up in this 
situation. Are you linking an app where there's both the current version 
of libavcodec and a separate version from elsewhere (e.g. libavcodec.so) 
possibly included transitively or something like that?

// Martin
diff mbox series

Patch

diff --git a/libavcodec/aarch64/videodsp.S b/libavcodec/aarch64/videodsp.S
index 24067cc2af..fe2da0658e 100644
--- a/libavcodec/aarch64/videodsp.S
+++ b/libavcodec/aarch64/videodsp.S
@@ -19,10 +19,11 @@ 
 #include "libavutil/aarch64/asm.S"
 
 function ff_prefetch_aarch64, export=1
+1:
         subs            w2,  w2,  #2
         prfm            pldl1strm, [x0]
         prfm            pldl1strm, [x0,  x1]
         add             x0,  x0,  x1,  lsl #1
-        b.gt            X(ff_prefetch_aarch64)
+        b.gt            1b
         ret
 endfunc