[PATCH] D92098: [obj2yaml] - Don't crash when dumping an object with no sections.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 00:28:44 PST 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/obj2yaml/ELF/eshnum.yaml:9
+## In the test case below we have an object with a non-zero section header table
+## file offset and the zero number of sections. Here we check that we are
+## able to dump such objects properly.
----------------



================
Comment at: llvm/tools/obj2yaml/elf2yaml.cpp:238
                                ArrayRef<ELFYAML::ProgramHeader> Phdrs,
                                std::vector<std::unique_ptr<ELFYAML::Chunk>> &V,
                                ArrayRef<typename ELFT::Shdr> S) {
----------------
I take it `V` doesn't normally contain a chunk for the null (index 0) section header?


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

https://reviews.llvm.org/D92098



More information about the llvm-commits mailing list