aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2024-12-03 00:31:19 +0100
committerGitHub <noreply@github.com>2024-12-03 00:31:19 +0100
commit867a1d621d1c6146dc29fa6b471407327d8f1bff (patch)
treed1fe332cf9165e3e507366c911cba892a9c93f25 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent5f881b7139bba1b8cd5c09ea021c78b92d1e72c9 (diff)
downloadllvm-867a1d621d1c6146dc29fa6b471407327d8f1bff.zip
llvm-867a1d621d1c6146dc29fa6b471407327d8f1bff.tar.gz
llvm-867a1d621d1c6146dc29fa6b471407327d8f1bff.tar.bz2
[sanitizer_common] mark __elf_aux_vector as weak on FreeBSD (#118110)
At some point FreeBSD introduced libsys as a wrapper between syscalls and libc, and then linking sanitized programs started failing with: ```text # c++ -fsanitize=address main.cc ld: error: undefined symbol: __elf_aux_vector >>> referenced by sanitizer_linux_libcdep.cpp:950 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:950) >>> sanitizer_linux_libcdep.o:(__sanitizer::ReExec()) in archive /usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a c++: error: linker command failed with exit code 1 (use -v to see invocation) ``` Mark `__elf_aux_vector` as weak in the internal sanitizer declaration, so the linker will accept it at link time. The dynamic linker will then take care of the symbol at run time.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions