[PATCH] D67054: [yaml2obj] Make e_phoff 0 if there are no program headers

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 01:53:57 PDT 2019


grimar accepted this revision.
grimar added a comment.

LGTM



================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:231
   Header.e_ehsize = sizeof(Elf_Ehdr);
   Header.e_phentsize = sizeof(Elf_Phdr);
   Header.e_phnum = Doc.ProgramHeaders.size();
----------------
Perhaps we might want to set this to 0 too when there are no headers.


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

https://reviews.llvm.org/D67054





More information about the llvm-commits mailing list