llvm-project/lld/test/ELF/lto
Fangrui Song 688183ec54 [ELF] Set `referenced` bit of Undefined created by BitcodeFile
D64136 and D65584, while fixing STB_WEAK issues and improving our
compatibility with ld.bfd, can cause another STB_WEAK problem related to
LTO:

If %tundef.o has an undefined reference on f,
and %tweakundef.o has a weak undefined reference on f,
%tdef.o has a definition of f

```
ld.lld %tundef.o %tweakundef.o --start-lib %tdef.o --end-lib
```

1) `%tundef.o` doesn't set the `referenced` bit.
2) `%weakundef.o` changes the binding from STB_GLOBAL to STB_WEAK
3) `%tdef.o` is not fetched because the binding is weak.

Step (1) is incorrect. This patch sets the `referenced` bit of Undefined
created by bitcode files.

Reviewed By: ruiu

Differential Revision: https://reviews.llvm.org/D66992

llvm-svn: 370437
2019-08-30 07:10:30 +00:00
..
Inputs [ELF] Set `referenced` bit of Undefined created by BitcodeFile 2019-08-30 07:10:30 +00:00
abs-resol.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
amdgcn.ll Handle identifying AMDGPU bitcode files 2018-08-27 12:40:00 +00:00
archive-2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
archive-3.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
archive-no-index.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
archive.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
asmundef.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
available-externally.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
bitcode-nodatalayout.ll [ELF] Remove -m argument to lld in test files. NFC. 2018-05-30 17:57:08 +00:00
cache.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
codemodel.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
combined-lto-object-name.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
comdat.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
comdat2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
common.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
common2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
common3.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
common4.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
cpu-string.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
ctors.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
data-ordering-lto.s [lld][NFC] Use explicit --symbols instead of -t in tests using llvm-readelf. 2018-11-06 19:34:22 +00:00
debugger-tune.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
defsym.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
deplibs.s [ELF] Implement Dependent Libraries Feature 2019-05-17 03:44:15 +00:00
discard-value-names.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
drop-debug-info.ll [ELF] Remove -m argument to lld in test files. NFC. 2018-05-30 17:57:08 +00:00
drop-linkage.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
duplicated-name.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
duplicated.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
dynamic-list.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
dynsym.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
emit-llvm.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
inline-asm.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
internalize-basic.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
internalize-exportdyn.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
internalize-llvmused.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
internalize-undef.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
internalize-version-script.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
irmover-error.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
irmover-warning.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
keep-undefined.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
lazy-internal.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
libcall-archive.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linkage.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linker-script-symbols-assign.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linker-script-symbols-ipo.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linker-script-symbols.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linkonce-odr.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
linkonce.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
lto-start.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
ltopasses-basic.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
ltopasses-custom.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
metadata.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
mix-platforms.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
mix-platforms2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
module-asm.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
new-pass-manager.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
obj-path.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
opt-level.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
opt-remarks.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
parallel-internalize.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
parallel.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
pic.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
ppc64le.ll [PPC64] Handle ppc64le triple in getBitcodeMachineKind. 2018-09-20 00:26:49 +00:00
r600.ll Handle identifying AMDGPU bitcode files 2018-08-27 12:40:00 +00:00
relax-relocs.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
relocatable.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
relocation-model.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
resolution.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
riscv32.ll [ELF][RISCV] Support RISC-V in getBitcodeMachineKind 2019-07-03 02:13:11 +00:00
riscv64.ll [ELF][RISCV] Support RISC-V in getBitcodeMachineKind 2019-07-03 02:13:11 +00:00
sample-profile.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
save-temps.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
section-name.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
setting-dso-local.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
shlib-undefined.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
start-lib.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
symbol-ordering-lto.s [lld][NFC] Use explicit --symbols instead of -t in tests using llvm-readelf. 2018-11-06 19:34:22 +00:00
thin-archivecollision.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-cant-write-index.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-debug-fission.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-emit-imports.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-index-file.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-index-only.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-no-index.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-obj-path.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-object-suffix-replace.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto-prefix-replace.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
thinlto.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
timepasses.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
tls-mixed.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
tls-preserve.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
type-merge.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
type-merge2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
undef-mixed.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
undef-weak-lazy.ll [ELF] Set `referenced` bit of Undefined created by BitcodeFile 2019-08-30 07:10:30 +00:00
undef-weak.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
undef.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
undefined-puts.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
unnamed-addr-comdat.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
unnamed-addr-drop.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
unnamed-addr-lib.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
unnamed-addr.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
verify-invalid.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
version-script.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
version-script2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
visibility.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
weak.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
weakodr-visibility.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
wrap-1.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00
wrap-2.ll Revert "Change the X86 datalayout to add three address spaces for 32 bit signed," 2019-08-28 01:08:54 +00:00