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)
commitf69b0585c1aa802a496737fa93443d4a215ae641
tree8b8173c48e8746547b5f4f6f56865069d7310d17
parent55c2699d29730d767def564befd2bf4ffbf9a3fe
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.

llvm-svn: 221975
llvm/include/llvm/Object/COFF.h
llvm/include/llvm/Object/COFFYAML.h
llvm/include/llvm/Support/COFF.h
llvm/lib/Object/COFFObjectFile.cpp
llvm/lib/Object/COFFYAML.cpp
llvm/tools/obj2yaml/coff2yaml.cpp
llvm/tools/yaml2obj/yaml2coff.cpp