New issue
Advanced search Search tips

Issue 917919 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Build-Toolchain

Blocking:
issue 878565



Sign in to add a comment

lld complains about ffmpeg symbols in Arm64 builds

Project Member Reported by manojgupta@chromium.org, Dec 26

Issue description

https://cros-goldeneye.corp.google.com/chromeos/healthmonitoring/buildDetails?buildbucketId=8926045713760722912

aarch64-cros-linux-gnu-clang++ -B/b/swarming/w/ir/tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+target_toolchain/ -Wno-unknown-warning-option -shared -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,-z,max-page-size=4096 -Wl,--icf=all -Wl,--color-diagnostics --target=aarch64-linux-gnu -Wl,-O2 -Wl,--gc-sections --sysroot=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/lib64 -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/lib64 -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/lib64 -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/lib64 -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/local/lib64 -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/local/lib64 -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/lib -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/lib -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/lib -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/lib -L../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/local/lib -Wl,-rpath-link=../../../../../../../../../../tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/local/lib -L/b/swarming/w/ir/tmp/t/cbuildbot-tmpP2pOpy/cbuildbot-tmpCORmHy/chrome-sdk-cachepAPquR/cache/chrome-sdk/tarballs/kevin64+__b__swarming__w__ir__cache__cbuild__repository__trybot_archive__kevin64-chrome-pfq-tryjob__R73-11474.0.0-b3279253+sysroot_chromeos-base_chromeos-chrome.tar.xz/usr/lib64 -Wl,-O2 -Wl,--as-needed -stdlib=libc++ -Wl,--no-fatal-warnings -Wl,-z,keep-text-section-prefix -o "./libclearkeycdm.so" -Wl,-soname="libclearkeycdm.so" @"./libclearkeycdm.so.rsp"
lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_dc_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:373 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:373)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_dc_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:373 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:373)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:374 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:374)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:374 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:374)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_dc_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:400 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:400)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16intra_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_dc_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:400 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:400)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16intra_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:401 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:401)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16intra_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:401 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:401)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add16intra_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_dc_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:427 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:427)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add8_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_dc_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:427 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:427)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add8_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:428 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:428)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add8_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:428 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:428)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct_add8_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct8_dc_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:642 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:642)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct8_add4_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct8_dc_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:642 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:642)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct8_add4_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: relocation R_AARCH64_ADR_PREL_PG_HI21 cannot be used against symbol ff_h264_idct8_add_neon; recompile with -fPIC
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:643 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:643)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct8_add4_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a

lld.real.elf: error: can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol: ff_h264_idct8_add_neon in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in obj/third_party/ffmpeg/libffmpeg_internal.a(ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o)
>>> referenced by asm.S:643 (../../third_party/ffmpeg/libavutil/aarch64/asm.S:643)
>>>               ffmpeg_internal/autorename_libavcodec_aarch64_h264idct_neon.o:(ff_h264_idct8_add4_neon) in archive obj/third_party/ffmpeg/libffmpeg_internal.a
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
[29343/44764] CXX obj/ui/views/views/views_delegate.o
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/third_party/ffmpeg/+/67e9e0337185f05a0d8d362473e63d8a9dfdebed

commit 67e9e0337185f05a0d8d362473e63d8a9dfdebed
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Dec 28 22:56:06 2018

libavcodec: Remove dynamic relocs from 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 GOT
relocations.
Use explicit labels instead so that no dynamic relocations are
needed at all.

BUG= chromium:917919 
TEST=lld complains are fixed.

Change-Id: Ie533a10aab1fe3834300599ce650d3673a674f4e
Reviewed-on: https://chromium-review.googlesource.com/c/1390286
Reviewed-by: Frank Liberato <liberato@chromium.org>

[modify] https://crrev.com/67e9e0337185f05a0d8d362473e63d8a9dfdebed/libavcodec/aarch64/h264idct_neon.S

Blocking: 878565
Cc: dalecur...@chromium.org liber...@chromium.org
Also submitted to ffmpeg upstream: https://www.mail-archive.com/ffmpeg-cvslog@ffmpeg.org/msg37140.html
Status: Verified (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36a504cc6faaed1f0d34c7e449c3707d4a6a3115

commit 36a504cc6faaed1f0d34c7e449c3707d4a6a3115
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Jan 09 19:08:55 2019

Roll src/third_party/ffmpeg/ 5340b1eb2..67e9e0337 (2 commits)

https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/5340b1eb263a..67e9e0337185

$ git log 5340b1eb2..67e9e0337 --date=short --no-merges --format='%ad %ae %s'
2018-12-27 manojgupta libavcodec: Remove dynamic relocs from h264idct_neon.S
2018-12-19 modmaker libavformat/mov: Fix NULL-dereference read for some encrypted content.

Created with:
  roll-dep src/third_party/ffmpeg

Bug:  917919 
Change-Id: I509a467f0117f6e9815db096669f55de81e885df
Reviewed-on: https://chromium-review.googlesource.com/c/1402341
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621252}
[modify] https://crrev.com/36a504cc6faaed1f0d34c7e449c3707d4a6a3115/DEPS

Sign in to add a comment