forked from OSchip/llvm-project
01660a3d2a
Summary: This is similar to what was done for Darwin in rL264645 / http://reviews.llvm.org/D16737, but it uses COFF COMDATs to achive the same result instead of relying on new custom linker features. As on MachO, this creates one metadata global per instrumented global. The metadata global is placed in the custom .ASAN$GL section, which the ASan runtime will iterate over during initialization. There are no other references to the metadata, so normal linker dead stripping would discard it. However, the metadata is put in a COMDAT group with the instrumented global, so that it will be discarded if and only if the instrumented global is discarded. I didn't update the ASan ABI version check since this doesn't affect non-Windows platforms, and the WinASan ABI isn't really stable yet. Implementing this for ELF will require extending LLVM IR and MC a bit so that we can use non-COMDAT section groups. Reviewers: pcc, kcc, mehdi_amini, kubabrecka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26770 llvm-svn: 287576 |
||
---|---|---|
.. | ||
X86 | ||
adaptive_global_redzones.ll | ||
asan-masked-load-store.ll | ||
asan-vs-gvn.ll | ||
asan_address_space_attr.ll | ||
basic-msvc64.ll | ||
basic.ll | ||
debug-info-global-var.ll | ||
debug_info.ll | ||
debug_info_noninstrumented_alloca.ll | ||
debug_info_noninstrumented_alloca2.ll | ||
do-not-instrument-globals-darwin.ll | ||
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 | ||
global_cstring_darwin.ll | ||
global_metadata.ll | ||
global_metadata_darwin.ll | ||
global_metadata_windows.ll | ||
instrument-dynamic-allocas.ll | ||
instrument-no-return.ll | ||
instrument-stack.ll | ||
instrument_global.ll | ||
instrument_initializer_metadata.ll | ||
instrument_load_then_store.ll | ||
instrumentation-with-call-threshold.ll | ||
keep_going.ll | ||
lifetime-throw.ll | ||
lifetime-uar-uas.ll | ||
lifetime.ll | ||
local_alias.ll | ||
localescape.ll | ||
scale-offset.ll | ||
stack-poisoning-and-lifetime-be.ll | ||
stack-poisoning-and-lifetime.ll | ||
stack-poisoning.ll | ||
stack_dynamic_alloca.ll | ||
stack_layout.ll | ||
str-nobuiltin.ll | ||
test64.ll | ||
twice.ll | ||
ubsan.ll |