obj2yaml, yaml2obj: Add support for COFF executables
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 14 Nov 2014 08:15:42 +0000 (08:15 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 14 Nov 2014 08:15:42 +0000 (08:15 +0000)
commit237544b16d9d99496395f2250547e4eda1d43c95
treea843f46648611175c6100c485406bc2d9fee5294
parentdada992be7f08c35cc70b5aaf32469d4a86e0225
obj2yaml, yaml2obj: Add support for COFF executables

In support of serializing executables, obj2yaml now records the virtual address
and size of sections.  It also serializes whatever we strictly need from
the PE header, it expects that it can reconstitute everything else via
inference.

yaml2obj can reconstitute a fully linked executable.

In order to get executables correctly serialized/deserialized, other
bugs were fixed as a circumstance.  We now properly respect file and
section alignments.  We also avoid writing out string tables unless they
are strictly necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221975 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/COFF.h
include/llvm/Object/COFFYAML.h
include/llvm/Support/COFF.h
lib/Object/COFFObjectFile.cpp
lib/Object/COFFYAML.cpp
tools/obj2yaml/coff2yaml.cpp
tools/yaml2obj/yaml2coff.cpp