[PATCH] D40899: [Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274)

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 07:59:15 PST 2017


ro created this revision.
ro added a project: Sanitizers.
Herald added subscribers: Sanitizers, fedor.sergeev, mgorny, kubamracek, srhines.

This patch, on top of https://reviews.llvm.org/D40898, contains the build system
changes necessary to enable the Solaris/x86 sanitizer port.

The only issue of note is the libclang_rt.sancov_{begin, end} libraries: clang relies on the
linker automatically defining __start_SECNAME and __stop_SECNAME labels for
sections whose names are valid C identifiers.  This is a GNU ld extension not present
in the ELF gABI, also implemented by gold and lld, but not by Solaris ld.  To work around
this, I automatically link the sancov_{begin,end} libraries into every executable for now.
There seems to be now way to build individual startup objects like crtbegin.o/crtend.o,
so I've followed the lead of libclang_rt.asan-preinit which also contains just a single
object.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D40899

Files:
  cmake/config-ix.cmake
  lib/asan/CMakeLists.txt
  lib/asan/scripts/asan_symbolize.py
  lib/sanitizer_common/CMakeLists.txt
  lib/sanitizer_common/sancov_begin.S
  lib/sanitizer_common/sancov_end.S

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40899.125730.patch
Type: text/x-patch
Size: 5367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171206/ea6b2983/attachment.bin>


More information about the llvm-commits mailing list