forked from OSchip/llvm-project
[llvm-readobj/ELF] Simplify Verdef handling.
llvm-svn: 254751
This commit is contained in:
parent
7123bca7fb
commit
20fe428859
|
@ -433,17 +433,11 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
|
|||
if (entry.isVerdef()) {
|
||||
// The first Verdaux entry holds the name.
|
||||
name_offset = entry.getVerdef()->getAux()->vda_name;
|
||||
} else {
|
||||
name_offset = entry.getVernaux()->vna_name;
|
||||
}
|
||||
|
||||
// Set IsDefault
|
||||
if (entry.isVerdef()) {
|
||||
IsDefault = !(vs->vs_index & ELF::VERSYM_HIDDEN);
|
||||
} else {
|
||||
name_offset = entry.getVernaux()->vna_name;
|
||||
IsDefault = false;
|
||||
}
|
||||
|
||||
if (name_offset >= StrTab.size())
|
||||
reportError("Invalid string offset");
|
||||
return StringRef(StrTab.data() + name_offset);
|
||||
|
|
Loading…
Reference in New Issue