llvm-project/llvm/test/Instrumentation/AddressSanitizer
Evgeniy Stepanov 964f4663c4 [asan] Fix dead stripping of globals on Linux.
Use a combination of !associated, comdat, @llvm.compiler.used and
custom sections to allow dead stripping of globals and their asan
metadata. Sometimes.

Currently this works on LLD, which supports SHF_LINK_ORDER with
sh_link pointing to the associated section.

This also works on BFD, which seems to treat comdats as
all-or-nothing with respect to linker GC. There is a weird quirk
where the "first" global in each link is never GC-ed because of the
section symbols.

At this moment it does not work on Gold (as in the globals are never
stripped).

This is a second re-land of r298158. This time, this feature is
limited to -fdata-sections builds.

llvm-svn: 301587
2017-04-27 20:27:27 +00:00
..
X86 [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
adaptive_global_redzones.ll
asan-masked-load-store.ll [ASan] Make ASan instrument variable-masked loads and stores 2017-01-06 15:24:51 +00:00
asan-vs-gvn.ll
asan_address_space_attr.ll
basic-msvc64.ll
basic.ll AddressSanitizer: don't track swifterror memory addresses 2017-02-15 20:43:43 +00:00
debug-info-global-var.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
debug_info.ll PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
debug_info_noninstrumented_alloca.ll
debug_info_noninstrumented_alloca2.ll [asan] Speed up compilation of large C++ stringmaps (tons of allocas) with ASan 2016-11-08 21:30:41 +00:00
do-not-instrument-globals-darwin.ll [Coverage] Darwin: Move __llvm_covmap from __DATA to __LLVM_COV 2016-10-27 23:17:51 +00:00
do-not-instrument-globals-linux.ll
do-not-instrument-internal-globals.ll
do-not-instrument-profiling-globals.ll
do-not-instrument-promotable-allocas.ll
do-not-instrument-sanitizers.ll
do-not-touch-comdat-global.ll
do-not-touch-odr-global.ll
do-not-touch-threadlocal.ll
experiment-call.ll
experiment.ll
freebsd.ll opt: Rename -default-data-layout flag to -data-layout and make it always override the layout. 2017-02-17 17:36:52 +00:00
global_cstring_darwin.ll [asan] Move instrumented null-terminated strings to a special section, LLVM part 2016-10-31 18:51:58 +00:00
global_metadata.ll [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
global_metadata_array.ll [asan] Let the frontend disable gc-sections optimization for asan globals. 2017-04-24 19:34:13 +00:00
global_metadata_darwin.ll [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
global_metadata_windows.ll [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
instrument-dynamic-allocas.ll
instrument-no-return.ll
instrument-stack.ll
instrument_global.ll [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
instrument_initializer_metadata.ll
instrument_load_then_store.ll [asan] Delay creation of asan ctor. 2017-04-06 19:55:09 +00:00
instrumentation-with-call-threshold.ll
keep_going.ll
lifetime-throw.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
lifetime-uar-uas.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
lifetime.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
local_alias.ll
localescape.ll
no-globals.ll [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
ps4.ll [AddressSanitizer] Add PS4 offset 2017-02-23 17:10:28 +00:00
scale-offset.ll
stack-poisoning-and-lifetime-be.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
stack-poisoning-and-lifetime.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
stack-poisoning.ll
stack_dynamic_alloca.ll
stack_layout.ll Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
str-nobuiltin.ll
test64.ll
twice.ll
ubsan.ll