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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 01:57:51 PST 2020


jhenderson added a comment.

I've not yet looked at the actual details of this change, but I wanted to flag up a concern: if we always dump these sections, we will see extra parts in the YAML of obj2yaml output that are actually unnecessary in many (most?) instances. As a result, people will start writing tests with extra useless details in, as many people use obj2yaml to generate the YAML for a test input, since they don't know enough about how to write YAML from scratch. We would then review these tests and ask people to remove the noise from the YAML (i.e. the unnecessary .dynsym etc descriptions), so that it is clearer what is being tested. We already do this for other things that aren't needed (e.g. section alignments), which I know can be irritating for some people. Now we're making them do yet more work for only a little gain.

I don't have a clear solution to this yet, as I agree we shouldn't throw away important information like section addresses when using obj2yaml. I'm not concerned by the section header order, as that technically has no impact on anything (as long as section indexes in other things are updated correctly). Could we perhaps only list the implicit sections when they have a non-default value for something (i.e. a value that would be different from when they are not specified, such as a non-zero address)?


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

https://reviews.llvm.org/D74955





More information about the llvm-commits mailing list