forked from OSchip/llvm-project
Don't error if __tls_get_addr is defined.
Turns out some systems do define it. Not producing an error in this case matches gold and bfd. llvm-svn: 287125
This commit is contained in:
parent
e0fc24210d
commit
95eae57d78
|
@ -137,7 +137,8 @@ DefinedRegular<ELFT> *SymbolTable<ELFT>::addAbsolute(StringRef Name,
|
|||
template <class ELFT>
|
||||
DefinedRegular<ELFT> *SymbolTable<ELFT>::addIgnored(StringRef Name,
|
||||
uint8_t Visibility) {
|
||||
if (!find(Name))
|
||||
SymbolBody *S = find(Name);
|
||||
if (!S || !S->isUndefined())
|
||||
return nullptr;
|
||||
return addAbsolute(Name, Visibility);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: llvm-mc %s -o %t.o -triple x86_64-pc-linux -filetype=obj
|
||||
// RUN: ld.lld %t.o -o %t
|
||||
|
||||
// Don't error if __tls_get_addr is defined.
|
||||
|
||||
.global _start
|
||||
.global __tls_get_addr
|
||||
_start:
|
||||
__tls_get_addr:
|
||||
nop
|
Loading…
Reference in New Issue