HomePhabricator

[COFF] Widen PE32Header fields to fit 64 bit versions

Authored by mstorsjo on Nov 19 2019, 1:29 AM.

Description

[COFF] Widen PE32Header fields to fit 64 bit versions

The PE32Header struct is only used by COFFYAML, for intermediate
storage. The struct doesn't match the on-disk struct layout as it
uses native integers instead of e.g. support::ulittle32_t, so just
widen the fields to fit values for object::pe32plus_header, in
addition to object::pe32_header.

This avoids truncating the 64 bit ImageBase for 64 bit executables.

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