@@ -228,9 +228,9 @@ class ELFDumper : public ObjDumper {
228
228
StringRef DynSymtabName;
229
229
ArrayRef<Elf_Word> ShndxTable;
230
230
231
- const Elf_Shdr *dot_gnu_version_sec = nullptr ; // .gnu.version
232
- const Elf_Shdr *dot_gnu_version_r_sec = nullptr ; // .gnu.version_r
233
- const Elf_Shdr *dot_gnu_version_d_sec = nullptr ; // .gnu.version_d
231
+ const Elf_Shdr *SymbolVersionSection = nullptr ; // .gnu.version
232
+ const Elf_Shdr *SymbolVersionNeedSection = nullptr ; // .gnu.version_r
233
+ const Elf_Shdr *SymbolVersionDefSection = nullptr ; // .gnu.version_d
234
234
235
235
// Records for each version index the corresponding Verdef or Vernaux entry.
236
236
// This is filled the first time LoadVersionMap() is called.
@@ -609,7 +609,7 @@ void ELFDumper<ELFT>::LoadVersionDefs(const Elf_Shdr *sec) const {
609
609
610
610
template <class ELFT > void ELFDumper<ELFT>::LoadVersionMap() const {
611
611
// If there is no dynamic symtab or version table, there is nothing to do.
612
- if (!DynSymRegion.Addr || !dot_gnu_version_sec )
612
+ if (!DynSymRegion.Addr || !SymbolVersionSection )
613
613
return ;
614
614
615
615
// Has the VersionMap already been loaded?
@@ -621,19 +621,19 @@ template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const {
621
621
VersionMap.push_back (VersionMapEntry ());
622
622
VersionMap.push_back (VersionMapEntry ());
623
623
624
- if (dot_gnu_version_d_sec )
625
- LoadVersionDefs (dot_gnu_version_d_sec );
624
+ if (SymbolVersionDefSection )
625
+ LoadVersionDefs (SymbolVersionDefSection );
626
626
627
- if (dot_gnu_version_r_sec )
628
- LoadVersionNeeds (dot_gnu_version_r_sec );
627
+ if (SymbolVersionNeedSection )
628
+ LoadVersionNeeds (SymbolVersionNeedSection );
629
629
}
630
630
631
631
template <typename ELFT>
632
632
StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
633
633
const Elf_Sym *Sym,
634
634
bool &IsDefault) const {
635
635
// This is a dynamic symbol. Look in the GNU symbol version table.
636
- if (!dot_gnu_version_sec ) {
636
+ if (!SymbolVersionSection ) {
637
637
// No version table.
638
638
IsDefault = false ;
639
639
return " " ;
@@ -647,7 +647,7 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
647
647
// Get the corresponding version index entry.
648
648
const Elf_Versym *Versym =
649
649
unwrapOrError (ObjF->getELFFile ()->template getEntry <Elf_Versym>(
650
- dot_gnu_version_sec , EntryIndex));
650
+ SymbolVersionSection , EntryIndex));
651
651
return this ->getSymbolVersionByIndex (StrTab, Versym->vs_index , IsDefault);
652
652
}
653
653
@@ -1351,19 +1351,19 @@ ELFDumper<ELFT>::ELFDumper(const object::ELFObjectFile<ELFT> *ObjF,
1351
1351
ShndxTable = unwrapOrError (Obj->getSHNDXTable (Sec));
1352
1352
break ;
1353
1353
case ELF::SHT_GNU_versym:
1354
- if (dot_gnu_version_sec != nullptr )
1354
+ if (SymbolVersionSection != nullptr )
1355
1355
reportError (" Multiple SHT_GNU_versym" );
1356
- dot_gnu_version_sec = &Sec;
1356
+ SymbolVersionSection = &Sec;
1357
1357
break ;
1358
1358
case ELF::SHT_GNU_verdef:
1359
- if (dot_gnu_version_d_sec != nullptr )
1359
+ if (SymbolVersionDefSection != nullptr )
1360
1360
reportError (" Multiple SHT_GNU_verdef" );
1361
- dot_gnu_version_d_sec = &Sec;
1361
+ SymbolVersionDefSection = &Sec;
1362
1362
break ;
1363
1363
case ELF::SHT_GNU_verneed:
1364
- if (dot_gnu_version_r_sec != nullptr )
1364
+ if (SymbolVersionNeedSection != nullptr )
1365
1365
reportError (" Multiple SHT_GNU_verneed" );
1366
- dot_gnu_version_r_sec = &Sec;
1366
+ SymbolVersionNeedSection = &Sec;
1367
1367
break ;
1368
1368
case ELF::SHT_LLVM_CALL_GRAPH_PROFILE:
1369
1369
if (DotCGProfileSec != nullptr )
@@ -1515,15 +1515,15 @@ void ELFDumper<ELFT>::printProgramHeaders(
1515
1515
template <typename ELFT> void ELFDumper<ELFT>::printVersionInfo() {
1516
1516
// Dump version symbol section.
1517
1517
ELFDumperStyle->printVersionSymbolSection (ObjF->getELFFile (),
1518
- dot_gnu_version_sec );
1518
+ SymbolVersionSection );
1519
1519
1520
1520
// Dump version definition section.
1521
1521
ELFDumperStyle->printVersionDefinitionSection (ObjF->getELFFile (),
1522
- dot_gnu_version_d_sec );
1522
+ SymbolVersionDefSection );
1523
1523
1524
1524
// Dump version dependency section.
1525
1525
ELFDumperStyle->printVersionDependencySection (ObjF->getELFFile (),
1526
- dot_gnu_version_r_sec );
1526
+ SymbolVersionNeedSection );
1527
1527
}
1528
1528
1529
1529
template <class ELFT > void ELFDumper<ELFT>::printDynamicRelocations() {
0 commit comments