[FFmpeg-devel] libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S

Submitted by Manoj Gupta on Dec. 28, 2018, 11:12 p.m.

Details

Message ID CAAMbb07X4VR6xM9WM3rL6YAVWrp1NpyJ7rYNV7WdQCnj29HumQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Manoj Gupta Dec. 28, 2018, 11:12 p.m.
Hi All,

I recently had a problem building ffmpeg for AArch64 where lld linker
complained about text relocations in readonly segment. The following
patch fixes the linker complains by referring to a local label instead
of function name.

This is similar in nature as the following previous commits:
https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html

Thanks,
Manoj

Patch:

libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S

Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
has code like:
        movrel          x14, X(ff_h264_idct_add_neon)

Linker cannot resolve them fully at link time and emits dynamic
relocations.
Use explicit labels instead so that no dynamic relocations are
needed at all.

This avoids lld complains about text relocations.

For background, see https://crbug.com/917919

Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
---
 libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

--

Comments

Carl Eugen Hoyos Dec. 29, 2018, 10:32 a.m.
2018-12-29 0:12 GMT+01:00, Manoj Gupta <manojgupta@chromium.org>:

> I recently had a problem building ffmpeg for AArch64 where lld
> linker complained about text relocations in readonly segment.
> The following patch fixes the linker complains by referring to a
> local label instead of function name.

Do you know why this issue wasn't found when the previously
fixed occurrences were seen?

Carl Eugen
Manoj Gupta Dec. 29, 2018, 4:17 p.m.
On Sat, Dec 29, 2018 at 2:32 AM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
> 2018-12-29 0:12 GMT+01:00, Manoj Gupta <manojgupta@chromium.org>:
>
> > I recently had a problem building ffmpeg for AArch64 where lld
> > linker complained about text relocations in readonly segment.
> > The following patch fixes the linker complains by referring to a
> > local label instead of function name.
>
> Do you know why this issue wasn't found when the previously
> fixed occurrences were seen?
>
This fixes the linking issues on AArch64. The previous fix I found was
for ARM32/Thumb whereas this file is AArch64 specific.

Thanks,
Manoj

> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Carl Eugen Hoyos Dec. 30, 2018, 11:46 p.m.
2018-12-29 17:17 GMT+01:00, Manoj Gupta <manojgupta@chromium.org>:
> On Sat, Dec 29, 2018 at 2:32 AM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>>
>> 2018-12-29 0:12 GMT+01:00, Manoj Gupta <manojgupta@chromium.org>:
>>
>> > I recently had a problem building ffmpeg for AArch64 where lld
>> > linker complained about text relocations in readonly segment.
>> > The following patch fixes the linker complains by referring to a
>> > local label instead of function name.
>>
>> Do you know why this issue wasn't found when the previously
>> fixed occurrences were seen?
>>
> This fixes the linking issues on AArch64. The previous fix I found
> was for ARM32/Thumb whereas this file is AArch64 specific.

Understood.

Thank you, Carl Eugen
Michael Niedermayer Dec. 31, 2018, 4:30 p.m.
On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> Hi All,
> 
> I recently had a problem building ffmpeg for AArch64 where lld linker
> complained about text relocations in readonly segment. The following
> patch fixes the linker complains by referring to a local label instead
> of function name.
> 
> This is similar in nature as the following previous commits:
> https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> 
> Thanks,
> Manoj
> 
> Patch:
> 
> libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> 
> Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> has code like:
>         movrel          x14, X(ff_h264_idct_add_neon)
> 
> Linker cannot resolve them fully at link time and emits dynamic
> relocations.
> Use explicit labels instead so that no dynamic relocations are
> needed at all.
> 
> This avoids lld complains about text relocations.
> 
> For background, see https://crbug.com/917919
> 
> Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> ---
>  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)

Has this been tested on all common aarch64 platforms ?

Also git doesnt separate the mail from the commit message and would
put the wholw email as the commit message, i assume that is not
intended.

thx

[...]
Manoj Gupta Jan. 2, 2019, 6:12 p.m.
On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > Hi All,
> >
> > I recently had a problem building ffmpeg for AArch64 where lld linker
> > complained about text relocations in readonly segment. The following
> > patch fixes the linker complains by referring to a local label instead
> > of function name.
> >
> > This is similar in nature as the following previous commits:
> > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> >
> > Thanks,
> > Manoj
> >
> > Patch:
> >
> > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> >
> > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > has code like:
> >         movrel          x14, X(ff_h264_idct_add_neon)
> >
> > Linker cannot resolve them fully at link time and emits dynamic
> > relocations.
> > Use explicit labels instead so that no dynamic relocations are
> > needed at all.
> >
> > This avoids lld complains about text relocations.
> >
> > For background, see https://crbug.com/917919
> >
> > Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> > ---
> >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> >  1 file changed, 12 insertions(+), 8 deletions(-)
>
> Has this been tested on all common aarch64 platforms ?
>
I have tested this on Chromium with clang+lld linker and Debian
aarch64 cross compiler gcc + bfd linker.
Please let me know if more testing is needed.

> Also git doesnt separate the mail from the commit message and would
> put the wholw email as the commit message, i assume that is not
> intended.

Sorry for the confusion about the commit message. Only the text
following "Patch:" is intended to be the commit message, but I had
tried to add  more context before the
patch text. I am fine with sending a v2 patch just containing the commit msg.

Thanks,
Manoj

>
> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Modern terrorism, a quick summary: Need oil, start war with country that
> has oil, kill hundread thousand in war. Let country fall into chaos,
> be surprised about raise of fundamantalists. Drop more bombs, kill more
> people, be surprised about them taking revenge and drop even more bombs
> and strip your own citizens of their rights and freedoms. to be continued
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Michael Niedermayer Jan. 2, 2019, 10:33 p.m.
On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote:
> On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
> <michael@niedermayer.cc> wrote:
> >
> > On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > > Hi All,
> > >
> > > I recently had a problem building ffmpeg for AArch64 where lld linker
> > > complained about text relocations in readonly segment. The following
> > > patch fixes the linker complains by referring to a local label instead
> > > of function name.
> > >
> > > This is similar in nature as the following previous commits:
> > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> > >
> > > Thanks,
> > > Manoj
> > >
> > > Patch:
> > >
> > > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> > >
> > > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > > has code like:
> > >         movrel          x14, X(ff_h264_idct_add_neon)
> > >
> > > Linker cannot resolve them fully at link time and emits dynamic
> > > relocations.
> > > Use explicit labels instead so that no dynamic relocations are
> > > needed at all.
> > >
> > > This avoids lld complains about text relocations.
> > >
> > > For background, see https://crbug.com/917919
> > >
> > > Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> > > ---
> > >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> > >  1 file changed, 12 insertions(+), 8 deletions(-)
> >
> > Has this been tested on all common aarch64 platforms ?
> >
> I have tested this on Chromium with clang+lld linker and Debian
> aarch64 cross compiler gcc + bfd linker.
> Please let me know if more testing is needed.

it would be good to test on apple too

thx

[...]
Manoj Gupta Jan. 3, 2019, 2:29 a.m.
On Wed, Jan 2, 2019 at 2:33 PM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote:
> > On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
> > <michael@niedermayer.cc> wrote:
> > >
> > > On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > > > Hi All,
> > > >
> > > > I recently had a problem building ffmpeg for AArch64 where lld linker
> > > > complained about text relocations in readonly segment. The following
> > > > patch fixes the linker complains by referring to a local label instead
> > > > of function name.
> > > >
> > > > This is similar in nature as the following previous commits:
> > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> > > >
> > > > Thanks,
> > > > Manoj
> > > >
> > > > Patch:
> > > >
> > > > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> > > >
> > > > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > > > has code like:
> > > >         movrel          x14, X(ff_h264_idct_add_neon)
> > > >
> > > > Linker cannot resolve them fully at link time and emits dynamic
> > > > relocations.
> > > > Use explicit labels instead so that no dynamic relocations are
> > > > needed at all.
> > > >
> > > > This avoids lld complains about text relocations.
> > > >
> > > > For background, see https://crbug.com/917919
> > > >
> > > > Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> > > > ---
> > > >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> > > >  1 file changed, 12 insertions(+), 8 deletions(-)
> > >
> > > Has this been tested on all common aarch64 platforms ?
> > >
> > I have tested this on Chromium with clang+lld linker and Debian
> > aarch64 cross compiler gcc + bfd linker.
> > Please let me know if more testing is needed.
>
> it would be good to test on apple too
>

Thanks, tested on my macbook compiling to aarch64 and the build itself was fine.

Use the following configure (+ make) command, hopefully I did it the right way.

 ./configure --cc=$HOME/ffmpeg/my-clang --cxx=$HOME/ffmpeg/my-clang++
--prefix=$HOME/ffmpeg/ffmpeg_out --enable-cross-compile --arch=aarch64
--target-os=darwin
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk
--sysinclude=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk

my-clang and my-clang++ are wrapper scripts passing the iphone SDK
headers to clang.

$ cat my-clang
#! /bin/bash
clang -isysroot $(xcrun --sdk iphoneos --show-sdk-path) -arch arm64 "$@"

Thanks,
Manoj

> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The real ebay dictionary, page 2
> "100% positive feedback" - "All either got their money back or didnt complain"
> "Best seller ever, very honest" - "Seller refunded buyer after failed scam"
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Michael Niedermayer Jan. 3, 2019, 9:53 p.m.
On Wed, Jan 02, 2019 at 06:29:22PM -0800, Manoj Gupta wrote:
> On Wed, Jan 2, 2019 at 2:33 PM Michael Niedermayer
> <michael@niedermayer.cc> wrote:
> >
> > On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote:
> > > On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
> > > <michael@niedermayer.cc> wrote:
> > > >
> > > > On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > > > > Hi All,
> > > > >
> > > > > I recently had a problem building ffmpeg for AArch64 where lld linker
> > > > > complained about text relocations in readonly segment. The following
> > > > > patch fixes the linker complains by referring to a local label instead
> > > > > of function name.
> > > > >
> > > > > This is similar in nature as the following previous commits:
> > > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> > > > >
> > > > > Thanks,
> > > > > Manoj
> > > > >
> > > > > Patch:
> > > > >
> > > > > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> > > > >
> > > > > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > > > > has code like:
> > > > >         movrel          x14, X(ff_h264_idct_add_neon)
> > > > >
> > > > > Linker cannot resolve them fully at link time and emits dynamic
> > > > > relocations.
> > > > > Use explicit labels instead so that no dynamic relocations are
> > > > > needed at all.
> > > > >
> > > > > This avoids lld complains about text relocations.
> > > > >
> > > > > For background, see https://crbug.com/917919
> > > > >
> > > > > Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> > > > > ---
> > > > >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> > > > >  1 file changed, 12 insertions(+), 8 deletions(-)
> > > >
> > > > Has this been tested on all common aarch64 platforms ?
> > > >
> > > I have tested this on Chromium with clang+lld linker and Debian
> > > aarch64 cross compiler gcc + bfd linker.
> > > Please let me know if more testing is needed.
> >
> > it would be good to test on apple too
> >
> 
> Thanks, tested on my macbook compiling to aarch64 and the build itself was fine.
> 
> Use the following configure (+ make) command, hopefully I did it the right way.
> 
>  ./configure --cc=$HOME/ffmpeg/my-clang --cxx=$HOME/ffmpeg/my-clang++
> --prefix=$HOME/ffmpeg/ffmpeg_out --enable-cross-compile --arch=aarch64
> --target-os=darwin
> --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk
> --sysinclude=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk
> 
> my-clang and my-clang++ are wrapper scripts passing the iphone SDK
> headers to clang.
> 
> $ cat my-clang
> #! /bin/bash
> clang -isysroot $(xcrun --sdk iphoneos --show-sdk-path) -arch arm64 "$@"

thanks, will apply

[...]
Manoj Gupta Jan. 4, 2019, 12:47 a.m.
Thanks a lot :-)

On Thu, Jan 3, 2019 at 1:53 PM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Wed, Jan 02, 2019 at 06:29:22PM -0800, Manoj Gupta wrote:
> > On Wed, Jan 2, 2019 at 2:33 PM Michael Niedermayer
> > <michael@niedermayer.cc> wrote:
> > >
> > > On Wed, Jan 02, 2019 at 10:12:33AM -0800, Manoj Gupta wrote:
> > > > On Mon, Dec 31, 2018 at 8:31 AM Michael Niedermayer
> > > > <michael@niedermayer.cc> wrote:
> > > > >
> > > > > On Fri, Dec 28, 2018 at 03:12:53PM -0800, Manoj Gupta wrote:
> > > > > > Hi All,
> > > > > >
> > > > > > I recently had a problem building ffmpeg for AArch64 where lld linker
> > > > > > complained about text relocations in readonly segment. The following
> > > > > > patch fixes the linker complains by referring to a local label instead
> > > > > > of function name.
> > > > > >
> > > > > > This is similar in nature as the following previous commits:
> > > > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34290.html
> > > > > > https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg34419.html
> > > > > >
> > > > > > Thanks,
> > > > > > Manoj
> > > > > >
> > > > > > Patch:
> > > > > >
> > > > > > libavcodec: Remove dynamic relocs from aarch64/h264idct_neon.S
> > > > > >
> > > > > > Some of the assembly functions e.g. ff_h264_idct_dc_add_neon
> > > > > > has code like:
> > > > > >         movrel          x14, X(ff_h264_idct_add_neon)
> > > > > >
> > > > > > Linker cannot resolve them fully at link time and emits dynamic
> > > > > > relocations.
> > > > > > Use explicit labels instead so that no dynamic relocations are
> > > > > > needed at all.
> > > > > >
> > > > > > This avoids lld complains about text relocations.
> > > > > >
> > > > > > For background, see https://crbug.com/917919
> > > > > >
> > > > > > Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
> > > > > > ---
> > > > > >  libavcodec/aarch64/h264idct_neon.S | 20 ++++++++++++--------
> > > > > >  1 file changed, 12 insertions(+), 8 deletions(-)
> > > > >
> > > > > Has this been tested on all common aarch64 platforms ?
> > > > >
> > > > I have tested this on Chromium with clang+lld linker and Debian
> > > > aarch64 cross compiler gcc + bfd linker.
> > > > Please let me know if more testing is needed.
> > >
> > > it would be good to test on apple too
> > >
> >
> > Thanks, tested on my macbook compiling to aarch64 and the build itself was fine.
> >
> > Use the following configure (+ make) command, hopefully I did it the right way.
> >
> >  ./configure --cc=$HOME/ffmpeg/my-clang --cxx=$HOME/ffmpeg/my-clang++
> > --prefix=$HOME/ffmpeg/ffmpeg_out --enable-cross-compile --arch=aarch64
> > --target-os=darwin
> > --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk
> > --sysinclude=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk
> >
> > my-clang and my-clang++ are wrapper scripts passing the iphone SDK
> > headers to clang.
> >
> > $ cat my-clang
> > #! /bin/bash
> > clang -isysroot $(xcrun --sdk iphoneos --show-sdk-path) -arch arm64 "$@"
>
> thanks, will apply
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> In a rich man's house there is no place to spit but his face.
> -- Diogenes of Sinope
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Patch hide | download patch | download mbox

diff --git a/libavcodec/aarch64/h264idct_neon.S
b/libavcodec/aarch64/h264idct_neon.S
index 825ec49f8c..7de44205d3 100644
--- a/libavcodec/aarch64/h264idct_neon.S
+++ b/libavcodec/aarch64/h264idct_neon.S
@@ -23,6 +23,7 @@ 
 #include "neon.S"

 function ff_h264_idct_add_neon, export=1
+.L_ff_h264_idct_add_neon:
         ld1             {v0.4H, v1.4H, v2.4H, v3.4H},  [x1]
         sxtw            x2,     w2
         movi            v30.8H, #0
@@ -77,6 +78,7 @@  function ff_h264_idct_add_neon, export=1
 endfunc

 function ff_h264_idct_dc_add_neon, export=1
+.L_ff_h264_idct_dc_add_neon:
         sxtw            x2,  w2
         mov             w3,       #0
         ld1r            {v2.8H},  [x1]
@@ -106,8 +108,8 @@  function ff_h264_idct_add16_neon, export=1
         mov             w9,  w3         // stride
         movrel          x7,  scan8
         mov             x10, #16
-        movrel          x13, X(ff_h264_idct_dc_add_neon)
-        movrel          x14, X(ff_h264_idct_add_neon)
+        movrel          x13, .L_ff_h264_idct_dc_add_neon
+        movrel          x14, .L_ff_h264_idct_add_neon
 1:      mov             w2,  w9
         ldrb            w3,  [x7], #1
         ldrsw           x0,  [x5], #4
@@ -133,8 +135,8 @@  function ff_h264_idct_add16intra_neon, export=1
         mov             w9,  w3         // stride
         movrel          x7,  scan8
         mov             x10, #16
-        movrel          x13, X(ff_h264_idct_dc_add_neon)
-        movrel          x14, X(ff_h264_idct_add_neon)
+        movrel          x13, .L_ff_h264_idct_dc_add_neon
+        movrel          x14, .L_ff_h264_idct_add_neon
 1:      mov             w2,  w9
         ldrb            w3,  [x7], #1
         ldrsw           x0,  [x5], #4
@@ -160,8 +162,8 @@  function ff_h264_idct_add8_neon, export=1
         add             x5,  x1,  #16*4         // block_offset
         add             x9,  x2,  #16*32        // block
         mov             w19, w3                 // stride
-        movrel          x13, X(ff_h264_idct_dc_add_neon)
-        movrel          x14, X(ff_h264_idct_add_neon)
+        movrel          x13, .L_ff_h264_idct_dc_add_neon
+        movrel          x14, .L_ff_h264_idct_add_neon
         movrel          x7,  scan8, 16
         mov             x10, #0
         mov             x11, #16
@@ -263,6 +265,7 @@  endfunc
 .endm

 function ff_h264_idct8_add_neon, export=1
+.L_ff_h264_idct8_add_neon:
         movi            v19.8H,   #0
         sxtw            x2,       w2
         ld1             {v24.8H, v25.8H}, [x1]
@@ -326,6 +329,7 @@  function ff_h264_idct8_add_neon, export=1
 endfunc

 function ff_h264_idct8_dc_add_neon, export=1
+.L_ff_h264_idct8_dc_add_neon:
         mov             w3,       #0
         sxtw            x2,       w2
         ld1r            {v31.8H}, [x1]
@@ -375,8 +379,8 @@  function ff_h264_idct8_add4_neon, export=1
         mov             w2,  w3
         movrel          x7,  scan8
         mov             w10, #16
-        movrel          x13, X(ff_h264_idct8_dc_add_neon)
-        movrel          x14, X(ff_h264_idct8_add_neon)
+        movrel          x13, .L_ff_h264_idct8_dc_add_neon
+        movrel          x14, .L_ff_h264_idct8_add_neon
 1:      ldrb            w9,  [x7], #4
         ldrsw           x0,  [x5], #16
         ldrb            w9,  [x4, w9, UXTW]