llvm-project/llvm/test/LTO/Resolution/X86
Fangrui Song d2ef8c1f2c [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker()
dso_local leads to direct access even if the definition is not within this compilation unit (it is
still in the same linkage unit). On ELF, such a relocation (e.g. R_X86_64_PC32) referencing a
STB_GLOBAL STV_DEFAULT object can cause a linker error in a -shared link.

If the linkage is changed to available_externally, the dso_local flag should be dropped, so that no
direct access will be generated.

The current behavior is benign, because -fpic does not assume dso_local
(clang/lib/CodeGen/CodeGenModule.cpp:shouldAssumeDSOLocal).
If we do that for -fno-semantic-interposition (D73865), there will be an
R_X86_64_PC32 linker error without this patch.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D74751
2020-04-07 15:46:01 -07:00
..
Inputs Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
alias-alias.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
alias.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
appending-var.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
asm-output.ll [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
available-externally.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
cache-dso-local.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
cache-dso-local2.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
cache-prevailing.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
comdat-mixed-lto.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
comdat.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
common2.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
commons.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
dead-strip-alias.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
dead-strip-fulllto.ll [LTO] Add optimization remarks for removed functions 2020-01-29 15:53:51 -08:00
diagnostic-handler-remarks-with-hotness.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
diagnostic-handler-remarks.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
empty-bitcode.test
export-jumptable.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
function-alias-non-prevailing.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
ifunc.ll [llvm-nm] Display STT_GNU_IFUNC as 'i' 2019-12-25 09:47:53 -08:00
ifunc2.ll Linker: Add support for GlobalIFunc. 2019-08-08 22:09:18 +00:00
intrinsic.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
link-odr-availextern.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
linker-redef-thin.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
linker-redef.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
linkonce.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lit.local.cfg
load-sample-prof-icp.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
load-sample-prof-lto.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
load-sample-prof.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
local-def-dllimport.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
lowertypetests.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-unit-check.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
mixed_lto.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
mod-asm-used.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
multi-thinlto.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
not-prevailing-alias.ll [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
not-prevailing-variables.ll ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration 2020-03-05 18:09:33 -08:00
not-prevailing-weak-aliasee.ll Revert r370105 - Update two x86 datalayouts for r370083, looks like racing commits 2019-08-28 01:55:06 +00:00
not-prevailing.ll [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
setting-dso-local.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
symtab-elf.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
symtab.ll
type-checked-load.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00