mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[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
This commit is contained in:
@@ -796,6 +796,14 @@ enum {
|
||||
STN_UNDEF = 0
|
||||
};
|
||||
|
||||
// Special relocation symbols used in the MIPS64 ELF relocation entries
|
||||
enum {
|
||||
RSS_UNDEF = 0, // None
|
||||
RSS_GP = 1, // Value of gp
|
||||
RSS_GP0 = 2, // Value of gp used to create object being relocated
|
||||
RSS_LOC = 3 // Address of location being relocated
|
||||
};
|
||||
|
||||
// Relocation entry, without explicit addend.
|
||||
struct Elf32_Rel {
|
||||
Elf32_Addr r_offset; // Location (file byte offset, or program virtual addr)
|
||||
|
Reference in New Issue
Block a user