[PATCH] D65394: [yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 05:23:17 PDT 2019


grimar added inline comments.


================
Comment at: test/Object/invalid.test:610
+
+## Check that we report an error if SHT_GNU_versym has invalid
+## sh_entsize value (3 instead of 2) when trying to access the entries.
----------------
MaskRay wrote:
> How about moving this yaml document to test/tools/yaml2obj/versym-section.yaml?
But we have `test/Object/invalid.test` exactly to check the errors reported in `llvm/Object/ELF.h`.

I.e. this test checks the functionality of lib/Object, just like the other 28 tests around.
Seems it is a proper place to have it?


================
Comment at: tools/yaml2obj/yaml2elf.cpp:800
+  if (Section.EntSize)
+    SHeader.sh_entsize = *Section.EntSize;
+  else
----------------
MaskRay wrote:
> `?:` may be used here.
Ok. Done.


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

https://reviews.llvm.org/D65394





More information about the llvm-commits mailing list