[all-commits] [llvm/llvm-project] 222939: [COFF] Widen PE32Header fields to fit 64 bit versions

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Nov 21 02:05:07 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2229391eb1632893571a435dd00f4ee71b5dbaf7
      https://github.com/llvm/llvm-project/commit/2229391eb1632893571a435dd00f4ee71b5dbaf7
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-11-21 (Thu, 21 Nov 2019)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/COFF.h
    M llvm/test/tools/yaml2obj/COFF/basic-arm64.yaml

  Log Message:
  -----------
  [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




More information about the All-commits mailing list