This reuses the code from yaml2obj (moves it to ELFYAML.h).
With it we can set the sh_entsize in a single place in obj2yaml.
Note that it also fixes a bug of yaml2obj: we do not
set the sh_entsize field for the SHT_ARM_EXIDX section properly.
| Paths 
 |  Differential  D93858  
[obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field. ClosedPublic Authored by grimar on Dec 28 2020, 5:19 AM. 
Details Summary This reuses the code from yaml2obj (moves it to ELFYAML.h). Note that it also fixes a bug of yaml2obj: we do not 
Diff Detail Event Timelinegrimar added a parent revision: D93854: [obj2yaml,yaml2obj] - Fix issues with creating/dumping group sections.. Comment Actions Could you explain why this patch fixes the ARM_EXIDX sh_entsize specifically? I don't see anything immediately that would only fix that section (and not other sections). 
 Comment Actions 
 It's because writeSectionContent(..., const ELFYAML::ARMIndexTableSection &Section, ...) doesn't set the EntSize field as it supposed to. This patch grimar marked 2 inline comments as done.Comment Actions 
 
 This revision is now accepted and ready to land.Jan 13 2021, 12:41 AM Closed by commit rG6d3098e7ff96: [obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field. (authored by grimar).  ·  Explain WhyJan 13 2021, 12:53 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
Diff 313848 llvm/include/llvm/ObjectYAML/ELFYAML.h
 llvm/lib/ObjectYAML/ELFEmitter.cpp
 llvm/test/Object/obj2yaml.test
 llvm/test/tools/obj2yaml/ELF/call-graph-profile-section.yaml
 llvm/test/tools/obj2yaml/ELF/mips-abi-flags.yaml
 llvm/test/tools/obj2yaml/ELF/sht-symtab-shndx.yaml
 llvm/test/tools/obj2yaml/ELF/versym-section.yaml
 llvm/test/tools/yaml2obj/ELF/arm-exidx-section.yaml
 llvm/tools/obj2yaml/elf2yaml.cpp
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Do you think this deserves a case where the entsize is not default?