summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/llvm-readobj/ELFDumper.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index d2fb2c3ce95..8be71b08efc 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -228,9 +228,9 @@ private:
StringRef DynSymtabName;
ArrayRef<Elf_Word> ShndxTable;
- const Elf_Shdr *dot_gnu_version_sec = nullptr; // .gnu.version
- const Elf_Shdr *dot_gnu_version_r_sec = nullptr; // .gnu.version_r
- const Elf_Shdr *dot_gnu_version_d_sec = nullptr; // .gnu.version_d
+ const Elf_Shdr *SymbolVersionSection = nullptr; // .gnu.version
+ const Elf_Shdr *SymbolVersionNeedSection = nullptr; // .gnu.version_r
+ const Elf_Shdr *SymbolVersionDefSection = nullptr; // .gnu.version_d
// Records for each version index the corresponding Verdef or Vernaux entry.
// This is filled the first time LoadVersionMap() is called.
@@ -609,7 +609,7 @@ void ELFDumper<ELFT>::LoadVersionDefs(const Elf_Shdr *sec) const {
template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const {
// If there is no dynamic symtab or version table, there is nothing to do.
- if (!DynSymRegion.Addr || !dot_gnu_version_sec)
+ if (!DynSymRegion.Addr || !SymbolVersionSection)
return;
// Has the VersionMap already been loaded?
@@ -621,11 +621,11 @@ template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const {
VersionMap.push_back(VersionMapEntry());
VersionMap.push_back(VersionMapEntry());
- if (dot_gnu_version_d_sec)
- LoadVersionDefs(dot_gnu_version_d_sec);
+ if (SymbolVersionDefSection)
+ LoadVersionDefs(SymbolVersionDefSection);
- if (dot_gnu_version_r_sec)
- LoadVersionNeeds(dot_gnu_version_r_sec);
+ if (SymbolVersionNeedSection)
+ LoadVersionNeeds(SymbolVersionNeedSection);
}
template <typename ELFT>
@@ -633,7 +633,7 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
const Elf_Sym *Sym,
bool &IsDefault) const {
// This is a dynamic symbol. Look in the GNU symbol version table.
- if (!dot_gnu_version_sec) {
+ if (!SymbolVersionSection) {
// No version table.
IsDefault = false;
return "";
@@ -647,7 +647,7 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
// Get the corresponding version index entry.
const Elf_Versym *Versym =
unwrapOrError(ObjF->getELFFile()->template getEntry<Elf_Versym>(
- dot_gnu_version_sec, EntryIndex));
+ SymbolVersionSection, EntryIndex));
return this->getSymbolVersionByIndex(StrTab, Versym->vs_index, IsDefault);
}
@@ -1351,19 +1351,19 @@ ELFDumper<ELFT>::ELFDumper(const object::ELFObjectFile<ELFT> *ObjF,
ShndxTable = unwrapOrError(Obj->getSHNDXTable(Sec));
break;
case ELF::SHT_GNU_versym:
- if (dot_gnu_version_sec != nullptr)
+ if (SymbolVersionSection != nullptr)
reportError("Multiple SHT_GNU_versym");
- dot_gnu_version_sec = &Sec;
+ SymbolVersionSection = &Sec;
break;
case ELF::SHT_GNU_verdef:
- if (dot_gnu_version_d_sec != nullptr)
+ if (SymbolVersionDefSection != nullptr)
reportError("Multiple SHT_GNU_verdef");
- dot_gnu_version_d_sec = &Sec;
+ SymbolVersionDefSection = &Sec;
break;
case ELF::SHT_GNU_verneed:
- if (dot_gnu_version_r_sec != nullptr)
+ if (SymbolVersionNeedSection != nullptr)
reportError("Multiple SHT_GNU_verneed");
- dot_gnu_version_r_sec = &Sec;
+ SymbolVersionNeedSection = &Sec;
break;
case ELF::SHT_LLVM_CALL_GRAPH_PROFILE:
if (DotCGProfileSec != nullptr)
@@ -1515,15 +1515,15 @@ void ELFDumper<ELFT>::printProgramHeaders(
template <typename ELFT> void ELFDumper<ELFT>::printVersionInfo() {
// Dump version symbol section.
ELFDumperStyle->printVersionSymbolSection(ObjF->getELFFile(),
- dot_gnu_version_sec);
+ SymbolVersionSection);
// Dump version definition section.
ELFDumperStyle->printVersionDefinitionSection(ObjF->getELFFile(),
- dot_gnu_version_d_sec);
+ SymbolVersionDefSection);
// Dump version dependency section.
ELFDumperStyle->printVersionDependencySection(ObjF->getELFFile(),
- dot_gnu_version_r_sec);
+ SymbolVersionNeedSection);
}
template <class ELFT> void ELFDumper<ELFT>::printDynamicRelocations() {
OpenPOWER on IntegriCloud