summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-11-03 12:21:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-11-03 12:21:00 +0000
commit84d6a171344333b7675425a241ff2a973e8fd627 (patch)
tree2d02b724ccadf87bce6f7cf5228f2ee62390a56c /lld/ELF/InputFiles.cpp
parent2227c7f425129018987e1846ed2360f16eba0729 (diff)
downloadbcm5719-llvm-84d6a171344333b7675425a241ff2a973e8fd627.tar.gz
bcm5719-llvm-84d6a171344333b7675425a241ff2a973e8fd627.zip
We already have the sections, pass them to getSHNDXTable.
llvm-svn: 285897
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 4d2618666ee..a2ef1cc87d3 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -318,7 +318,7 @@ void elf::ObjectFile<ELFT>::initializeSections(
this->Symtab = &Sec;
break;
case SHT_SYMTAB_SHNDX:
- this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec));
+ this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec, ObjSections));
break;
case SHT_STRTAB:
case SHT_NULL:
@@ -575,7 +575,8 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
const Elf_Shdr *DynamicSec = nullptr;
const ELFFile<ELFT> Obj = this->ELFObj;
- for (const Elf_Shdr &Sec : check(Obj.sections())) {
+ ArrayRef<Elf_Shdr> Sections = check(Obj.sections());
+ for (const Elf_Shdr &Sec : Sections) {
switch (Sec.sh_type) {
default:
continue;
@@ -586,7 +587,7 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
DynamicSec = &Sec;
break;
case SHT_SYMTAB_SHNDX:
- this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec));
+ this->SymtabSHNDX = check(Obj.getSHNDXTable(Sec, Sections));
break;
case SHT_GNU_versym:
this->VersymSec = &Sec;
OpenPOWER on IntegriCloud