[PATCH] D59877: [llvm-readobj] Add GNU style dumper for .gnu.version section

Xing via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 19:23:40 PDT 2019


Higuoxing added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:3385
+
+  // readelf prints 4 entries per line.
+  for (uint32_t VersymRow = 0; VersymRow < Entries; VersymRow += 4) {
----------------
jhenderson wrote:
> Does this behaviour hold if using --wide in GNU readelf?
No, in `GNU readelf`, `--wide` option has no effect on `-V` option.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:3403
+        OS << format("%4x%c", Versym->vs_index & VERSYM_VERSION,
+                     Versym->vs_index & VERSYM_HIDDEN ? 'h' : ' ');
+
----------------
jhenderson wrote:
> Test case for hidden symbols?
Done.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:3413
+          VersionName = "(*invalid*)";
+        OS << left_justify(VersionName, 13);
+      }
----------------
jhenderson wrote:
> What happens if the version name is longer than this? (Is that even possible?)
Yes, it's possible. But `GNU readelf` does not do any improvement here, shall we?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59877/new/

https://reviews.llvm.org/D59877





More information about the llvm-commits mailing list