[all-commits] [llvm/llvm-project] fdd884: [sanitizer_common] mark __elf_aux_vector as weak o...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Fri Nov 29 08:41:02 PST 2024
Branch: refs/heads/users/DimitryAndric/fix-freebsd-elf-aux-vector-1
Home: https://github.com/llvm/llvm-project
Commit: fdd88456827a08a48eb20eb0765dde30e4823bf6
https://github.com/llvm/llvm-project/commit/fdd88456827a08a48eb20eb0765dde30e4823bf6
Author: Dimitry Andric <dimitry at andric.com>
Date: 2024-11-29 (Fri, 29 Nov 2024)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Log Message:
-----------
[sanitizer_common] mark __elf_aux_vector as weak on FreeBSD
At some point FreeBSD introduced libsys as a wrapper between syscalls
and libc, and then linking sanitized programs started failing with:
# 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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list