[PATCH] D93858: [obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 28 05:19:02 PST 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: atanasyan, hiraditya, kristof.beyls, emaste.
Herald added a reviewer: espindola.
grimar requested review of this revision.
Herald added a project: LLVM.

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.

Depends on https://reviews.llvm.org/D93854


https://reviews.llvm.org/D93858

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93858.313848.patch
Type: text/x-patch
Size: 18712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201228/d79353db/attachment.bin>


More information about the llvm-commits mailing list