forked from OSchip/llvm-project
Don't create a plt when LD access is optimized.
llvm-svn: 265203
This commit is contained in:
parent
cf3b04dab9
commit
059f3fb8fb
|
@ -279,7 +279,7 @@ static unsigned handleTlsRelocation(uint32_t Type, SymbolBody &Body,
|
|||
InputSectionBase<ELFT> &C, RelT &RI) {
|
||||
if (Target->pointsToLocalDynamicGotEntry(Type)) {
|
||||
if (Target->canRelaxTls(Type, nullptr))
|
||||
return 1;
|
||||
return 2;
|
||||
if (Out<ELFT>::Got->addTlsIndex())
|
||||
Out<ELFT>::RelaDyn->addReloc({Target->TlsModuleIndexRel,
|
||||
DynamicReloc<ELFT>::Off_LTlsIndex,
|
||||
|
|
|
@ -15,6 +15,16 @@ _start:
|
|||
rex64
|
||||
callq __tls_get_addr@PLT
|
||||
|
||||
leaq bar@TLSLD(%rip), %rdi
|
||||
callq __tls_get_addr@PLT
|
||||
leaq bar@DTPOFF(%rax), %rax
|
||||
|
||||
.type bar,@object
|
||||
.section .tdata,"awT",@progbits
|
||||
.align 8
|
||||
bar:
|
||||
.long 42
|
||||
|
||||
|
||||
.type foo,@object
|
||||
.section .tdata,"awT",@progbits
|
||||
|
|
Loading…
Reference in New Issue