diff options
-rw-r--r-- | lld/ELF/ICF.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/InputFiles.h | 2 | ||||
-rw-r--r-- | lld/ELF/InputSection.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/OutputSections.cpp | 2 | ||||
-rw-r--r-- | lld/ELF/Writer.cpp | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp index 5c950ddfaeb..0f23e640cfc 100644 --- a/lld/ELF/ICF.cpp +++ b/lld/ELF/ICF.cpp @@ -162,7 +162,7 @@ template <class ELFT> SymbolBody &ICF<ELFT>::getSymbol(const InputSection<ELFT> *Sec, const Elf_Rel *Rel) { uint32_t SymIdx = Rel->getSymbol(Config->Mips64EL); - return Sec->File->getSymbolBody(SymIdx).repl(); + return Sec->File->getSymbolBody(SymIdx); } // All sections between Begin and End must have the same group ID before diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index f6c9e9b711d..8776550c095 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -124,7 +124,7 @@ public: InputSectionBase<ELFT> *getSection(const Elf_Sym &Sym) const; SymbolBody &getSymbolBody(uint32_t SymbolIndex) const { - return *SymbolBodies[SymbolIndex]; + return SymbolBodies[SymbolIndex]->repl(); } const Elf_Shdr *getSymbolTable() const { return this->Symtab; }; diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index cb2cbba2677..b114ce726da 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -81,7 +81,7 @@ template <class ELFT> static DefinedRegular<ELFT> *getRelocTargetSym(elf::ObjectFile<ELFT> *File, const typename ELFT::Rel &Rel) { uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL); - SymbolBody &B = File->getSymbolBody(SymIndex).repl(); + SymbolBody &B = File->getSymbolBody(SymIndex); if (auto *D = dyn_cast<DefinedRegular<ELFT>>(&B)) if (D->Section) return D; @@ -155,7 +155,7 @@ void InputSection<ELFT>::copyRelocations(uint8_t *Buf, ArrayRef<RelTy> Rels) { for (const RelTy &Rel : Rels) { uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL); uint32_t Type = Rel.getType(Config->Mips64EL); - SymbolBody &Body = this->File->getSymbolBody(SymIndex).repl(); + SymbolBody &Body = this->File->getSymbolBody(SymIndex); RelTy *P = reinterpret_cast<RelTy *>(Buf); Buf += sizeof(RelTy); diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 146eaff0b7c..811ba80d862 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -1139,7 +1139,7 @@ void EHOutputSection<ELFT>::addSectionAux(EHInputSection<ELFT> *S, SymbolBody *Personality = nullptr; if (HasReloc) { uint32_t SymIndex = RelI->getSymbol(Config->Mips64EL); - Personality = &S->getFile()->getSymbolBody(SymIndex).repl(); + Personality = &S->getFile()->getSymbolBody(SymIndex); } std::pair<StringRef, SymbolBody *> CieInfo(Entry, Personality); diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index bf2a4dc2ce8..eec053683ee 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -362,7 +362,7 @@ void Writer<ELFT>::scanRelocsForThunks(const elf::ObjectFile<ELFT> &File, for (const RelTy &RI : Rels) { uint32_t Type = RI.getType(Config->Mips64EL); uint32_t SymIndex = RI.getSymbol(Config->Mips64EL); - SymbolBody &Body = File.getSymbolBody(SymIndex).repl(); + SymbolBody &Body = File.getSymbolBody(SymIndex); if (Body.hasThunk() || !Target->needsThunk(Type, File, Body)) continue; auto *D = cast<DefinedRegular<ELFT>>(&Body); @@ -521,7 +521,7 @@ void Writer<ELFT>::scanRelocs(InputSectionBase<ELFT> &C, ArrayRef<RelTy> Rels) { for (auto I = Rels.begin(), E = Rels.end(); I != E; ++I) { const RelTy &RI = *I; uint32_t SymIndex = RI.getSymbol(Config->Mips64EL); - SymbolBody &Body = File.getSymbolBody(SymIndex).repl(); + SymbolBody &Body = File.getSymbolBody(SymIndex); uint32_t Type = RI.getType(Config->Mips64EL); // Ignore "hint" relocation because it is for optional code optimization. |