[PATCH] D59186: [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU style`

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 05:48:45 PDT 2019


jhenderson added a comment.

In D59186#1436228 <https://reviews.llvm.org/D59186#1436228>, @Higuoxing wrote:

> In D59186#1436196 <https://reviews.llvm.org/D59186#1436196>, @jhenderson wrote:
>
> > What's the relation between this patch and D59545 <https://reviews.llvm.org/D59545>?
>
>
> I want to implement dumpers for these sections. In `.gnu.version`, we should print the version name of a versioning symbol, so I need a helper function to find the version name by its `vs_index`.


Right, so does this patch depend on D59545 <https://reviews.llvm.org/D59545> then?



================
Comment at: tools/llvm-readobj/ELFDumper.cpp:4488
+  const uint8_t *VersymBuf = (const uint8_t *)Obj->base() + Sec->sh_offset;
+  StringRef StrTable = this->dumper()->getDynamicStringTable();
+
----------------
jhenderson wrote:
> It may be worth factoring out `this->dumper()` into a local variable, since you use it in a number of places.
This hasn't been done?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59186





More information about the llvm-commits mailing list