[PATCH] D120626: [ELF] Move section assignment from initializeSymbols to postParse
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 19:04:38 PDT 2022
MaskRay added a comment.
In D120626#3384544 <https://reviews.llvm.org/D120626#3384544>, @haowei wrote:
> While `c1d4c67718db88be48f451b91f7bddab8fff2424` clears the cmake error. I am now seeing `runtimes-i386-unknown-linux-gnu` build failures related to the same symbol:
>
> [367/1127] Linking CXX shared library /b/s/w/ir/x/w/staging/llvm_build/lib/clang/15.0.0/lib/i386-unknown-linux-gnu/libclang_rt.ubsan_minimal.so
> FAILED: /b/s/w/ir/x/w/staging/llvm_build/lib/clang/15.0.0/lib/i386-unknown-linux-gnu/libclang_rt.ubsan_minimal.so
> : && /b/s/w/ir/x/w/staging/llvm_build/./bin/clang++ --target=i386-unknown-linux-gnu --sysroot=/b/s/w/ir/x/w/cipd/linux -fPIC --target=i386-unknown-linux-gnu -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/b/s/w/ir/x/w/staging/llvm_build/runtimes/runtimes-i386-unknown-linux-gnu-bins=../staging/llvm_build/runtimes/runtimes-i386-unknown-linux-gnu-bins -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -Wall -std=c++14 -Wno-unused-parameter -O2 -g -DNDEBUG -fuse-ld=lld -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics -nodefaultlibs -Wl,-z,text -nostdlib++ -shared -Wl,-soname,libclang_rt.ubsan_minimal.so -o /b/s/w/ir/x/w/staging/llvm_build/lib/clang/15.0.0/lib/i386-unknown-linux-gnu/libclang_rt.ubsan_minimal.so compiler-rt/lib/ubsan_minimal/CMakeFiles/RTUbsan_minimal.i386.dir/ubsan_minimal_handlers.cpp.o -Wl,-rpath,"\$ORIGIN/../lib:/b/s/w/ir/x/w/staging/llvm_build/./lib" -lc /b/s/w/ir/x/w/staging/llvm_build/lib/clang/15.0.0/lib/i386-unknown-linux-gnu/libclang_rt.builtins.a && :
> ld.lld: error: relocation R_386_PC32 cannot refer to absolute symbol: __x86.get_pc_thunk.bx
> >>> defined in /b/s/w/ir/x/w/cipd/linux/usr/lib/i386-linux-gnu/crti.o
> >>> referenced by /b/s/w/ir/x/w/cipd/linux/usr/lib/i386-linux-gnu/crti.o:(.init+0x5)
>
> ld.lld: error: relocation R_386_PC32 cannot refer to absolute symbol: __x86.get_pc_thunk.bx
> >>> defined in /b/s/w/ir/x/w/cipd/linux/usr/lib/i386-linux-gnu/crti.o
> >>> referenced by /b/s/w/ir/x/w/cipd/linux/usr/lib/i386-linux-gnu/crti.o:(.fini+0x5)
> clang++: error: linker command failed with exit code 1 (use -v to see invocation)
>
> The failed build is https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8819579887511161281/overview which was started after your patch was landed.
I just reverted the patch in 9b61fff0eb9332553ecdbe00e01e3d08ad392768 <https://reviews.llvm.org/rG9b61fff0eb9332553ecdbe00e01e3d08ad392768> since I need to think a bit how to support `__x86.get_pc_thunk.bx`.
Thanks for the i386 sysroot. It allowed me to improve the test `i386-linkonce.s` to describe the case we have to work around more precisely.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120626/new/
https://reviews.llvm.org/D120626
More information about the llvm-commits
mailing list