[PATCH] D120048: [sanitizer_common] Use GetStaticTlsBoundary on Solaris 11.4

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 05:42:34 PST 2022


ro created this revision.
ro added reviewers: MaskRay, vitalybuka.
ro added a project: Sanitizers.
Herald added subscribers: pengfei, fedor.sergeev, krytarowski, mgorny, jyknight.
ro requested review of this revision.
Herald added a subscriber: Sanitizers.

This is a restricted alternative to D91605 <https://reviews.llvm.org/D91605> which only works on Solaris 11.4 SRU 10+, but would break the build on Solaris 11.3 and Illumos which lack `dlpi_tls_modid`.

Apart from that, the patch is trivial.  One caveat is that the `sanitizer_common` and `asan` tests need to be linked explicitly with `ld -z relax=transtls` on Solaris/amd64 since the archives with calls to `__tls_get_addr` are linked in directly.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and `x86_64-pc-linux-gnu`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120048

Files:
  compiler-rt/cmake/config-ix.cmake
  compiler-rt/lib/asan/tests/CMakeLists.txt
  compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
  compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120048.409605.patch
Type: text/x-patch
Size: 5203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220217/f979b8d1/attachment.bin>


More information about the llvm-commits mailing list