mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
Don't create a plt when LD access is optimized.
llvm-svn: 265203
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user