HomePhabricator

[yaml2obj] Simplify p_filesz/p_memsz computing

Description

[yaml2obj] Simplify p_filesz/p_memsz computing

This fixes a bug as well. When "FileSize:" (p_filesz) is specified and
different from the actual value, the following code probably should not
use PHeader.p_filesz:

if (SHeader->sh_offset == PHeader.p_offset + PHeader.p_filesz)
  PHeader.p_memsz += SHeader->sh_size;

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D67256

Details

Committed
MaskRaySep 9 2019, 9:45 AM
Reviewer
jhenderson
Differential Revision
D67256: [yaml2obj] Simplify p_filesz/p_memsz computing
Parents
rL371419: [ARM] Fix loads and stores for predicate vectors
Branches
Unknown
Tags
Unknown