obj2yaml: Use the correct relocation type for different machine types
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 7 Apr 2014 23:12:20 +0000 (23:12 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 7 Apr 2014 23:12:20 +0000 (23:12 +0000)
commitde6256c93843467da3dfe16d02a92ed66f762c2d
tree24db2e7bf6b319b1acd9a7377832a96767c98c82
parentb9a65fd0028acd588f8382a50f7271e332fc363d
obj2yaml: Use the correct relocation type for different machine types

The IO normalizer would essentially lump I386 and AMD64 relocations
together.  Relocation types with the same numeric value would then get
mapped in appropriately.

For example:
IMAGE_REL_AMD64_ADDR64 and IMAGE_REL_I386_DIR16 both have a numeric
value of one.  We would see IMAGE_REL_I386_DIR16 in obj2yaml conversions
of object files with a machine type of IMAGE_FILE_MACHINE_AMD64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205746 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/COFFYAML.h
include/llvm/Support/COFF.h
lib/Object/COFFYAML.cpp
test/Object/Inputs/COFF/x86-64.yaml
test/Object/Inputs/trivial-object-test.coff-x86-64
test/Object/obj2yaml.test