[Bug 277393] Linking fails with sanitizers

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 29 Feb 2024 15:40:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277393

            Bug ID: 277393
           Summary: Linking fails with sanitizers
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: hartmut.brandt@dlr.de

The introduction of libsys makes linking with sanitizers fail. Try:

# cat main.cc
int
main()
{
}
# 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)


Same with cc.

This is on:
FreeBSD 15.0-CURRENT FreeBSD 15.0-CURRENT #2 main-n268536-8db56defa766: Mon Feb
26 09:32:31 CET 2024

-- 
You are receiving this mail because:
You are the assignee for the bug.