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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 02:25:29 PST 2020


grimar marked 2 inline comments as done.
grimar added a comment.

In D74955#1897495 <https://reviews.llvm.org/D74955#1897495>, @jhenderson wrote:

> A thought, but I think it's a pre-existing issue: let's say I have a custom SHT_STRTAB section that isn't the symbol or section header string table. This code seems to prevent that section being emitted?


Before this patch seems we never emitted those. With this patch we will emit something (but not the `Content` for example) for allocatable sections and will emit nothing for non-allocatable.
So, situation is slightly better with this patch, but still far from ideal.



================
Comment at: llvm/test/tools/obj2yaml/duplicate-symbol-and-section-names.test:128
 
-# CASE3:      --- !ELF
-# CASE3-NEXT: FileHeader:
-# CASE3-NEXT:   Class:   ELFCLASS64
-# CASE3-NEXT:   Data:    ELFDATA2LSB
-# CASE3-NEXT:   Type:    ET_DYN
-# CASE3-NEXT:   Machine: EM_X86_64
-# CASE3-NEXT: Symbols:
+# CASE3:      Symbols:
 # CASE3-NEXT:   - Name:    foo
----------------
jhenderson wrote:
> Unrelated change which should probably be committed separately?
It is related: now between the `FileHeader` key and `Symbols` there are also `Sections` because .dynsym/.dynstr are created.


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

https://reviews.llvm.org/D74955





More information about the llvm-commits mailing list