[PATCH] D67221: [yaml2obj] Write the section header table after section contents

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 08:42:02 PDT 2019


jhenderson added a comment.

In D67221#1662273 <https://reviews.llvm.org/D67221#1662273>, @MaskRay wrote:

> I have considered this use case. An unconventional placement of the section header table may detect problems that reply on its exact position. Making it follow the convention will no longer detect such problems. Just like we have `SHOff, SHNum, ShOffset, etc`, we can probably add an option to place the section header table immediately after the program header, if we consider this check useful. A more general option is to add a gap between the program header table and the first section.


I might even go one step further and allow an option to force the exact offset of the section header table (and the program header table for that matter), as opposed to just the value written in the ELF header. That would allow for maximum flexibility. Having a default of after the sections though makes a lot of sense to me.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67221





More information about the llvm-commits mailing list