Fixed potential crash on non-ELF64LE targets.

Incorrect template specialization was used (generic ELFT type was expected but platform specific was used).

llvm-svn: 254253
This commit is contained in:
George Rimar 2015-11-29 14:14:20 +00:00
parent 704b795634
commit cc06a6ffd3
1 changed files with 1 additions and 1 deletions

View File

@ -811,7 +811,7 @@ lld::elf2::getLocalRelTarget(const ObjectFile<ELFT> &File,
if (Sym->getType() == STT_TLS)
return (Section->OutSec->getVA() + Section->getOffset(*Sym) + Addend) -
Out<ELF64LE>::TlsPhdr->p_vaddr;
Out<ELFT>::TlsPhdr->p_vaddr;
// According to the ELF spec reference to a local symbol from outside
// the group are not allowed. Unfortunately .eh_frame breaks that rule