[PATCH] D131433: [ARM] Use getSymbolPreferLocal() in GetARMGVSymbol

Alan Zhao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 13:16:19 PDT 2022


ayzhao added a comment.

In D131433#3735694 <https://reviews.llvm.org/D131433#3735694>, @ayzhao wrote:

> This is causing linker failures in Android Chromium builds: https://crbug.com/1354305
>
> Sample output:
>
>   [484/106609] LINK ./test_mixed_component_demo
>   FAILED: test_mixed_component_demo exe.unstripped/test_mixed_component_demo exe.unstripped/test_mixed_component_demo.map.gz
>   python3 "../../build/toolchain/gcc_link_wrapper.py" --output="./test_mixed_component_demo" --strip="../../third_party/llvm-build/Release+Asserts/bin/llvm-strip" --unstripped-file="./exe.unstripped/test_mixed_component_demo" --map-file "./exe.unstripped/test_mixed_component_demo.map.gz" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Werror -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin -Wl,--thinlto-jobs=all -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=5 -march=armv7-a -Wl,--no-rosegment -Wl,--no-call-graph-profile-sort -Wl,--exclude-libs=libvpx_assembly_arm.a --unwindlib=none --target=arm-linux-androideabi23 -no-canonical-prefixes -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,-z,defs -Wl,--as-needed -nostdlib++ --sysroot=../../third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Wl,--warn-shared-textrel -Wl,--lto-O0 -pie -Bdynamic -Wl,-z,nocopyreloc -o "./exe.unstripped/test_mixed_component_demo" -Wl,--start-group @"./test_mixed_component_demo.rsp"  -Wl,--end-group  -landroid_support -ldl -lm
>   ld.lld: error: thinlto-cache/llvmcache-CFD42F77DBE4B29AA4645765DE7225F761BBE9DD:(function _Unwind_VRS_Pop: .text.unlikely._Unwind_VRS_Pop+0xcc): branch and link relocation: R_ARM_THM_CALL to non STT_FUNC symbol: .L_Unwind_VRS_Set$local interworking not performed; consider using directive '.type .L_Unwind_VRS_Set$local, %function' to give symbol type STT_FUNC if interworking between ARM and Thumb is required; Unwind-EHABI.cpp:1120 (../../buildtools/third_party/libunwind/trunk/src/Unwind-EHABI.cpp:1120)
>   clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Repro made with `-Wl,--reproduce=repro.tar`: https://drive.google.com/file/d/1pgQI2adwx3DJJqIYvMY4i249ouHU0rmu/view?usp=sharing


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131433/new/

https://reviews.llvm.org/D131433



More information about the llvm-commits mailing list