[PATCH] D74955: [obj2yaml] - Dump SHT_STRTAB, SHT_SYMTAB and SHT_DYNSYM sections.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 10:41:59 PST 2020


MaskRay added a comment.

Since rL238073 <https://reviews.llvm.org/rL238073>, clang no longer produces .shstrtab, but rather uses a unified .strtab for both section names and symbol names. Dumping `SHT_STRTAB` is necessary to differentiate the two cases.

Do you mean that yaml2obj generated SHT_DYNSYM is not at the normal place (early in the section header table, somewhere before .rodata)?



================
Comment at: llvm/tools/obj2yaml/elf2yaml.cpp:243
+    case ELF::SHT_DYNSYM: {
+      // We do not really want to dump these sections because they are added
+      // implicitly. But we want to create placeholders here to print them.
----------------
The contents of these sections are described by other parts of the YAML file. We still dump them so that their positions in the section header table are correctly recorded.


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

https://reviews.llvm.org/D74955





More information about the llvm-commits mailing list