1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Instrumentation/AddressSanitizer
Fangrui Song b451f3588d [sanitizer] Place module_ctor/module_dtor in llvm.used
This removes an abuse of ELF linker behaviors while keeping Mach-O/COFF linker
behaviors unchanged.

ELF: when module_ctor is in a comdat, this patch removes reliance on a linker
abuse (an SHT_INIT_ARRAY in a section group retains the whole group) by using
SHF_GNU_RETAIN. No linker behavior difference when module_ctor is not in a comdat.

Mach-O: module_ctor gets `N_NO_DEAD_STRIP`. No linker behavior difference
because module_ctor is already referenced by a `S_MOD_INIT_FUNC_POINTERS`
section (GC root).

PE/COFF: no-op. SanitizerCoverage already appends module_ctor to `llvm.used`.
Other sanitizers: llvm.used for local linkage is not implemented in
`TargetLoweringObjectFileCOFF::emitLinkerDirectives` (once implemented or
switched to a non-local linkage, COFF can use module_ctor in comdat (i.e.
generalize ELF-specific rL301586)).

There is no object file size difference.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106246
2021-07-21 14:03:26 -07:00
..
AMDGPU
X86
adaptive_global_redzones.ll
alloca-offset-lifetime.ll
asan_address_space_attr.ll
asan-detect-invalid-pointer-pair.ll
asan-masked-load-store.ll
asan-vs-gvn.ll
basic-msvc64.ll
basic.ll
byref-args.ll
byval-args.ll
debug_info_noninstrumented_alloca2.ll
debug_info_noninstrumented_alloca.ll
debug_info.ll
debug-info-alloca.ll
debug-info-global-var.ll
do-not-instrument-globals-darwin.ll
do-not-instrument-globals-linux.ll
do-not-instrument-internal-globals.ll
do-not-instrument-netbsd-link_set.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
dynamic-shadow-darwin.ll
experiment-call.ll
experiment.ll
fake-stack.ll
force-dynamic-shadow.ll
freebsd.ll
global_addrspace.ll
global_cstring_darwin.ll
global_lto_merge.ll
global_metadata_array.ll
global_metadata_bitcasts.ll
global_metadata_darwin.ll
global_metadata_external_comdat.ll
global_metadata_windows.ll
global_metadata.ll
global_with_comdat.ll
hoist-argument-init-insts.ll
instrument_global.ll
instrument_initializer_metadata.ll
instrument_load_then_store.ll
instrument-dynamic-allocas.ll
instrument-no-return.ll
instrument-section-invalid-c-ident.ll
instrument-stack.ll
instrumentation-with-call-threshold.ll
keep_going.ll
lifetime-throw.ll
lifetime-uar-uas.ll
lifetime.ll
local_alias.ll
local_stack_base.ll
localescape.ll
module-flags.ll
musttail.ll
no_global_dtors.ll
no-globals.ll
odr-check-ignore.ll
ps4.ll
scale-offset.ll
stack_dynamic_alloca.ll
stack_layout.ll
stack-poisoning-and-lifetime-be.ll
stack-poisoning-and-lifetime.ll
stack-poisoning-byval-args.ll
stack-poisoning.ll
str-nobuiltin.ll
test64.ll
twice.ll
ubsan.ll
version-mismatch-check.ll
win-sorted-sections.ll
win-string-literal.ll
with-ifunc.ll