summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/InputSection.cpp2
-rw-r--r--lld/ELF/InputSection.h6
-rw-r--r--lld/ELF/OutputSections.cpp26
3 files changed, 17 insertions, 17 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index cdcbe879f28..7561f377dd7 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -84,7 +84,7 @@ void InputSection<ELFT>::writeTo(uint8_t *Buf,
ObjectFile<ELFT> *File = getFile();
ELFFile<ELFT> &EObj = File->getObj();
uint8_t *Base = Buf + getOutputSectionOff();
- uintX_t BaseAddr = Out->getVA() + getOutputSectionOff();
+ uintX_t BaseAddr = OutSec->getVA() + getOutputSectionOff();
// Iterate over all relocation sections that apply to this section.
for (const Elf_Shdr *RelSec : RelocSections) {
if (RelSec->sh_type == SHT_RELA)
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index cba8ee26767..b25d77015e3 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -53,8 +53,8 @@ public:
}
void setOutputSectionOff(uint64_t V) { OutputSectionOff = V; }
- void setOutputSection(OutputSection<ELFT> *O) { Out = O; }
- OutputSection<ELFT> *getOutputSection() const { return Out; }
+ void setOutputSection(OutputSection<ELFT> *O) { OutSec = O; }
+ OutputSection<ELFT> *getOutputSection() const { return OutSec; }
// Relocation sections that refer to this one.
SmallVector<const Elf_Shdr *, 1> RelocSections;
@@ -75,7 +75,7 @@ private:
// The file this section is from.
ObjectFile<ELFT> *File;
- OutputSection<ELFT> *Out = nullptr;
+ OutputSection<ELFT> *OutSec = nullptr;
const Elf_Shdr *Header;
};
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 636440ed352..00a244a2a46 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -114,7 +114,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
const InputSection<ELFT> &C = Rel.C;
const Elf_Rel &RI = Rel.RI;
- OutputSection<ELFT> *Out = C.getOutputSection();
+ OutputSection<ELFT> *OutSec = C.getOutputSection();
uint32_t SymIndex = RI.getSymbol(IsMips64EL);
const ObjectFile<ELFT> &File = *C.getFile();
const SymbolBody *Body = File.getSymbolBody(SymIndex);
@@ -143,7 +143,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
} else {
if (IsRela)
Addend += static_cast<const Elf_Rela &>(RI).r_addend;
- P->r_offset = RI.r_offset + C.getOutputSectionOff() + Out->getVA();
+ P->r_offset = RI.r_offset + C.getOutputSectionOff() + OutSec->getVA();
if (CanBePreempted)
P->setSymbolAndType(Body->getDynamicSymbolTableIndex(), Type,
IsMips64EL);
@@ -442,8 +442,8 @@ lld::elf2::getLocalSymVA(const typename ELFFile<ELFT>::Elf_Sym *Sym,
Sym, File.getSymbolTable(), File.getSymbolTableShndx());
ArrayRef<InputSection<ELFT> *> Sections = File.getSections();
InputSection<ELFT> *Section = Sections[SecIndex];
- OutputSection<ELFT> *Out = Section->getOutputSection();
- return Out->getVA() + Section->getOutputSectionOff() + Sym->st_value;
+ OutputSection<ELFT> *OutSec = Section->getOutputSection();
+ return OutSec->getVA() + Section->getOutputSectionOff() + Sym->st_value;
}
bool lld::elf2::canBePreempted(const SymbolBody *Body) {
@@ -580,9 +580,9 @@ void SymbolTableSection<ELFT>::writeLocalSymbols(uint8_t *&Buf) {
&Sym, File.getSymbolTable(), File.getSymbolTableShndx());
ArrayRef<InputSection<ELFT> *> Sections = File.getSections();
const InputSection<ELFT> *Section = Sections[SecIndex];
- const OutputSection<ELFT> *Out = Section->getOutputSection();
- ESym->st_shndx = Out->getSectionIndex();
- VA += Out->getVA() + Section->getOutputSectionOff();
+ const OutputSection<ELFT> *OutSec = Section->getOutputSection();
+ ESym->st_shndx = OutSec->getSectionIndex();
+ VA += OutSec->getVA() + Section->getOutputSectionOff();
}
ESym->st_value = VA;
}
@@ -608,18 +608,18 @@ void SymbolTableSection<ELFT>::writeGlobalSymbols(uint8_t *&Buf) {
ESym->st_name = StrTabSec.getFileOff(Name);
- const OutputSection<ELFT> *Out = nullptr;
+ const OutputSection<ELFT> *OutSec = nullptr;
const InputSection<ELFT> *Section = nullptr;
switch (Body->kind()) {
case SymbolBody::DefinedSyntheticKind:
- Out = &cast<DefinedSynthetic<ELFT>>(Body)->Section;
+ OutSec = &cast<DefinedSynthetic<ELFT>>(Body)->Section;
break;
case SymbolBody::DefinedRegularKind:
Section = &cast<DefinedRegular<ELFT>>(Body)->Section;
break;
case SymbolBody::DefinedCommonKind:
- Out = &BssSec;
+ OutSec = &BssSec;
break;
case SymbolBody::UndefinedKind:
case SymbolBody::DefinedAbsoluteKind:
@@ -648,12 +648,12 @@ void SymbolTableSection<ELFT>::writeGlobalSymbols(uint8_t *&Buf) {
ESym->st_value = getSymVA(*Body, BssSec);
if (Section)
- Out = Section->getOutputSection();
+ OutSec = Section->getOutputSection();
if (isa<DefinedAbsolute<ELFT>>(Body))
ESym->st_shndx = SHN_ABS;
- else if (Out)
- ESym->st_shndx = Out->getSectionIndex();
+ else if (OutSec)
+ ESym->st_shndx = OutSec->getSectionIndex();
}
if (!StrTabSec.isDynamic())
std::stable_sort(
OpenPOWER on IntegriCloud