[PATCH] D73045: [obj2yaml] - Better indentations in the ELF output.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 07:53:38 PST 2020


jhenderson added a comment.

I'll give this a more thorough look at some point hopefully, but my instinct is the current situation is the worst of the three cases "good padding"/"excessive padding"/"no padding". I think a little bit of code complexity would be okay to improve the excessive padding situation. I'm not sure instinctively whether this is too much however. I'll give it some thought.



================
Comment at: llvm/test/tools/obj2yaml/elf-output-indentation.yaml:19
+# CHECK-NEXT:    Type:         SHT_PROGBITS
+# CHECK-NEXT:    AddressAlign: 0x0000000000000001
+# CHECK-NEXT:  - Name:        .rela.text
----------------
grimar wrote:
> Here the additional indentation appears because of `AddressAlign`, which is
> the largest key among others. The same situation is shown below.
> I did not investigate how much hard to to improve such places too yet.
I definitely find it weird that .text is not indented to the same extend as .data.


================
Comment at: llvm/test/tools/obj2yaml/elf-output-indentation.yaml:20-24
+# CHECK-NEXT:  - Name:        .rela.text
+# CHECK-NEXT:    Type:        SHT_RELA
+# CHECK-NEXT:    Link:        .symtab
+# CHECK-NEXT:    EntSize:     0x0000000000000018
+# CHECK-NEXT:    Info:        .text
----------------
I'm guessing this block is indented because of Relocations? This doesn't seem great, given that the Reloctions line doesn't have a direct value itself.


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

https://reviews.llvm.org/D73045





More information about the llvm-commits mailing list