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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 7 18:27:54 PDT 2019


MaskRay added a comment.

In D67221#1660429 <https://reviews.llvm.org/D67221#1660429>, @jhenderson wrote:

> Thanks for doing this. I have vague concerns that there might be some tests out there that assume the section header table's position, and somehow rely on it, but are now passing for unrelated reasons to their original intent, but I don't have a good way to check for them short of auditing every yaml2obj user, which seems silly, so I guess we just have to take that risk.


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.

In D67221#1662264 <https://reviews.llvm.org/D67221#1662264>, @grimar wrote:

> BB is happy: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/13822


Thanks!


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