[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)
commit5d19c67a68533d716fd791ea5a4cdb6b13a26ab1
tree44a69f5e7273e2994174c1ae21f78505e8a35e7d
parent1a603b3f13e10a378602a1ed164e59b61e2fa485
[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

llvm-svn: 227044
llvm/include/llvm/Object/ELFTypes.h
llvm/include/llvm/Object/ELFYAML.h
llvm/include/llvm/Support/ELF.h
llvm/lib/Object/ELFYAML.cpp
llvm/test/Object/Mips/elf-mips64-rel.yaml [new file with mode: 0644]
llvm/tools/yaml2obj/yaml2elf.cpp