[PATCH] D78304: [yaml2obj] - Program headers: introduce the `POffset` and add an additional check for `Offset`

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 06:59:40 PDT 2020


jhenderson added a comment.

In D78304#1992157 <https://reviews.llvm.org/D78304#1992157>, @grimar wrote:

> This is what this patch does. It introduces an error when the program header `Offset` forced is greater than the minimal section offset.
>  But since we need a way to set an arbitrary value for some tests (to override `p_offset`), I've introduced `POffset`, which does not affect on the properties of a program header, it just overrides the `p_offset` field without any checks.
>
> So I think the behavior you described is exactly what this patch does, or not ?


The bit I don't understand is the need for the POffset field. In such instances, just don't list the sections and use explicit Offset + FileSize/MemSize. The sizes wouldn't make sense anyway since the program header would be at a weird location.


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

https://reviews.llvm.org/D78304





More information about the llvm-commits mailing list