[compiler-rt] [compiler-rt] [sanitizer_common] Fix SIGSEGV in ForEachMappedRegion for DSOs with custom image base (PR #206299)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 09:51:50 PDT 2026


thurstond wrote:

```
/usr/bin/ld: /tmp/gotsan.6GH9Tsn12P/race_linux_amd64.syso: in function `__sanitizer::DladdrSelfFName()':
gotsan.cpp:(.text+0x41d21): undefined reference to `dladdr'
/usr/bin/ld: /tmp/gotsan.6GH9Tsn12P/race_linux_amd64.syso: in function `__sanitizer::DladdrElfHeaderBase(void*, char*)':
gotsan.cpp:(.text+0x41d4c): undefined reference to `dladdr'
/usr/bin/ld: /tmp/gotsan.6GH9Tsn12P/race_linux_amd64.syso: in function `__sanitizer::ForEachMappedRegion(link_map*, void (*)(void const*, unsigned long))':
gotsan.cpp:(.text+0x46477): undefined reference to `dladdr'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

I wonder if the buildbot is using an older toolchain that needs `-ldl`?

https://github.com/llvm/llvm-project/pull/206299


More information about the llvm-commits mailing list