[ELFYAML] Support mips64 relocation record format in yaml2obj/obj2yaml
authorSimon Atanasyan <simon@atanasyan.com>
Sun, 25 Jan 2015 13:29:25 +0000 (13:29 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Sun, 25 Jan 2015 13:29:25 +0000 (13:29 +0000)
commit09a46075ee77e31548964c9246658d93c7ab4319
tree370f67223b3cb7f4c7b8358c012ecc6578824ba7
parent717d41d8c3b021066bcbeb460aa962322bc1752d
[ELFYAML] Support mips64 relocation record format in yaml2obj/obj2yaml

MIPS64 ELF file has a very specific relocation record format. Each
record might specify up to three relocation operations. So the `r_info`
field in fact consists of three relocation type sub-fields and optional
code of "special" symbols.

http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
page 40

The patch implements support of the MIPS64 relocation record format in
yaml2obj/obj2yaml tools by introducing new optional Relocation fields:
Type2, Type3, and SpecSym. These fields are recognized only if the
object/YAML file relates to the MIPS64 target.

Differential Revision: http://reviews.llvm.org/D7136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227044 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELFTypes.h
include/llvm/Object/ELFYAML.h
include/llvm/Support/ELF.h
lib/Object/ELFYAML.cpp
test/Object/Mips/elf-mips64-rel.yaml [new file with mode: 0644]
tools/yaml2obj/yaml2elf.cpp