forked from OSchip/llvm-project
7b78956224
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 |
||
---|---|---|
.. | ||
AMDGPU | ||
X86 | ||
adaptive_global_redzones.ll | ||
alloca-offset-lifetime.ll | ||
asan-detect-invalid-pointer-pair.ll | ||
asan-masked-load-store.ll | ||
asan-vs-gvn.ll | ||
asan_address_space_attr.ll | ||
basic-msvc64.ll | ||
basic.ll | ||
byref-args.ll | ||
byval-args.ll | ||
debug-info-alloca.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-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.ll | ||
global_metadata_array.ll | ||
global_metadata_bitcasts.ll | ||
global_metadata_darwin.ll | ||
global_metadata_external_comdat.ll | ||
global_metadata_windows.ll | ||
global_with_comdat.ll | ||
hoist-argument-init-insts.ll | ||
instrument-dynamic-allocas.ll | ||
instrument-no-return.ll | ||
instrument-section-invalid-c-ident.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 | ||
local_stack_base.ll | ||
localescape.ll | ||
module-flags.ll | ||
musttail.ll | ||
no-globals.ll | ||
no_global_dtors.ll | ||
odr-check-ignore.ll | ||
ps4.ll | ||
scale-offset.ll | ||
stack-poisoning-and-lifetime-be.ll | ||
stack-poisoning-and-lifetime.ll | ||
stack-poisoning-byval-args.ll | ||
stack-poisoning.ll | ||
stack_dynamic_alloca.ll | ||
stack_layout.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 |