diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-10 12:44:05 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-11 12:24:37 +0300 |
commit | 445c3fdd2ae8648cd79f98d3d72ff142b4c19792 (patch) | |
tree | 531cabd8ce1e2446b754c2de2a668887f11d91b7 /llvm/tools/llvm-readobj | |
parent | 21bc8958668a4dc21de8328ef856ddcf38a97da7 (diff) | |
download | llvm-445c3fdd2ae8648cd79f98d3d72ff142b4c19792.zip llvm-445c3fdd2ae8648cd79f98d3d72ff142b4c19792.tar.gz llvm-445c3fdd2ae8648cd79f98d3d72ff142b4c19792.tar.bz2 |
[llvm-readelf] - Do no print an empty symbol version as "<corrupt>"
It is discussed here https://reviews.llvm.org/D71118#inline-643172
Currently when a version is empty, llvm-readelf prints:
"000: 0 (*local*) 2 (<corrupt>)"
But GNU readelf does not treat empty section as corrupt.
There is no sense in having empty versions anyways it seems, but
this change is for consistency with GNU.
Differential revision: https://reviews.llvm.org/D71243
Diffstat (limited to 'llvm/tools/llvm-readobj')
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 145c625..733b36e 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -4133,7 +4133,7 @@ void GNUStyle<ELFT>::printVersionSymbolSection(const ELFFile<ELFT> *Obj, bool IsDefault; Expected<StringRef> NameOrErr = this->dumper()->getSymbolVersionByIndex(Ndx, IsDefault); - if (!NameOrErr || NameOrErr->empty()) { + if (!NameOrErr) { if (!NameOrErr) { unsigned SecNdx = Sec - &cantFail(Obj->sections()).front(); this->reportUniqueWarning(createError( |