summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-09-24 15:11:50 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-09-24 15:11:50 +0000
commite1901cc33df90d0f32b58380cc4ad619496d09e3 (patch)
tree0e8c1de864b970704893ad88bd187af4ea940b5b /lld/ELF/OutputSections.cpp
parentf209cdfade65a822d34160c94f103a8e3bf02498 (diff)
downloadbcm5719-llvm-e1901cc33df90d0f32b58380cc4ad619496d09e3.tar.gz
bcm5719-llvm-e1901cc33df90d0f32b58380cc4ad619496d09e3.zip
Simplify memory management by having ELFData contain a ELFObj.
llvm-svn: 248502
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 113f25b8690..04036d00522 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -64,7 +64,7 @@ PltSection<ELFT>::getEntryAddr(const SymbolBody &B) const {
template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
const unsigned EntrySize = IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel);
- bool IsMips64EL = Relocs[0].C.getFile()->getObj()->isMips64EL();
+ bool IsMips64EL = Relocs[0].C.getFile()->getObj().isMips64EL();
for (const DynamicReloc<ELFT> &Rel : Relocs) {
auto *P = reinterpret_cast<Elf_Rel *>(Buf);
Buf += EntrySize;
@@ -242,7 +242,7 @@ lld::elf2::getLocalSymVA(const typename ELFFile<ELFT>::Elf_Sym *Sym,
uint32_t SecIndex = Sym->st_shndx;
if (SecIndex == SHN_XINDEX)
- SecIndex = File.getObj()->getExtendedSymbolTableIndex(
+ SecIndex = File.getObj().getExtendedSymbolTableIndex(
Sym, File.getSymbolTable(), File.getSymbolTableShndx());
ArrayRef<InputSection<ELFT> *> Sections = File.getSections();
InputSection<ELFT> *Section = Sections[SecIndex];
@@ -309,7 +309,7 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) {
ESym->st_size = Sym.st_size;
ESym->setBindingAndType(Sym.getBinding(), Sym.getType());
if (SecIndex == SHN_XINDEX)
- SecIndex = File.getObj()->getExtendedSymbolTableIndex(
+ SecIndex = File.getObj().getExtendedSymbolTableIndex(
&Sym, File.getSymbolTable(), File.getSymbolTableShndx());
ArrayRef<InputSection<ELFT> *> Sections = File.getSections();
Section = Sections[SecIndex];
OpenPOWER on IntegriCloud