[PATCH] D103455: [yaml2obj] Add support for writing the long symbol name.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 00:13:11 PDT 2021


jhenderson added a comment.

In D103455#2805561 <https://reviews.llvm.org/D103455#2805561>, @Esme wrote:

> Addressed comments except dumping the raw string table.
> It seems llvm-readobj can't dump the raw string table for XCOFF, I have to find another tool to do this.

I think it would make a lot of sense to add string table dumping to llvm-readobj. It's generic enough that you could probably get away with implementing it for multiple file formats too (e.g. for ELF it would dump all SHT_STRTAB sections), but initially, you can just implement it for XCOFF. I'd use a switch name as simple as `--string-table` or possibly `--string-tables`.



================
Comment at: llvm/test/tools/yaml2obj/XCOFF/long-symbol-name.yaml:30-33
+  MagicNumber:       0x1DF
+Symbols:
+  - Name:            .long_symbol_name
+  - Name:            .short
----------------
You can remove the excessive whitespace between the key and value.

I'd also make the names just long enough/not quite long enough to need the string table, to test the boundary conditions of the name length check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103455



More information about the llvm-commits mailing list