Add definitions for MIPS TLS relocations to elftoolchain.
This makes our readelf more useful when looking for TLS-related issues.
This commit is contained in:
parent
a3dd461d2d
commit
c85c1e4bd7
@ -1659,25 +1659,38 @@ _ELF_DEFINE_RELOC(R_IA_64_DTPREL64MSB, 0xB6) \
|
||||
_ELF_DEFINE_RELOC(R_IA_64_DTPREL64LSB, 0xB7) \
|
||||
_ELF_DEFINE_RELOC(R_IA_64_LTOFF_DTPREL22, 0xBA)
|
||||
|
||||
#define _ELF_DEFINE_MIPS_RELOCATIONS() \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_NONE, 0) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_16, 1) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_32, 2) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_REL32, 3) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_26, 4) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_HI16, 5) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_LO16, 6) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GPREL16, 7) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_LITERAL, 8) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOT16, 9) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_PC16, 10) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALL16, 11) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GPREL32, 12) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_64, 18) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31)
|
||||
#define _ELF_DEFINE_MIPS_RELOCATIONS() \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_NONE, 0) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_16, 1) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_32, 2) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_REL32, 3) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_26, 4) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_HI16, 5) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_LO16, 6) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GPREL16, 7) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_LITERAL, 8) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOT16, 9) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_PC16, 10) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALL16, 11) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GPREL32, 12) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_64, 18) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32 38) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32 39) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64 40) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64 41) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GD 42) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM 43) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16 44) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16 45) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL 46) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32 47) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64 48) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16 49) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16 50)
|
||||
|
||||
#define _ELF_DEFINE_PPC32_RELOCATIONS() \
|
||||
_ELF_DEFINE_RELOC(R_PPC_NONE, 0) \
|
||||
|
@ -1295,6 +1295,20 @@ r_type(unsigned int mach, unsigned int type)
|
||||
case 22: return "R_MIPS_GOTLO16";
|
||||
case 30: return "R_MIPS_CALLHI16";
|
||||
case 31: return "R_MIPS_CALLLO16";
|
||||
case 38: return "R_MIPS_TLS_DTPMOD32";
|
||||
case 39: return "R_MIPS_TLS_DTPREL32";
|
||||
case 40: return "R_MIPS_TLS_DTPMOD64";
|
||||
case 41: return "R_MIPS_TLS_DTPREL64";
|
||||
case 42: return "R_MIPS_TLS_GD";
|
||||
case 43: return "R_MIPS_TLS_LDM";
|
||||
case 44: return "R_MIPS_TLS_DTPREL_HI16";
|
||||
case 45: return "R_MIPS_TLS_DTPREL_LO16";
|
||||
case 46: return "R_MIPS_TLS_GOTTPREL";
|
||||
case 47: return "R_MIPS_TLS_TPREL32";
|
||||
case 48: return "R_MIPS_TLS_TPREL64";
|
||||
case 49: return "R_MIPS_TLS_TPREL_HI16";
|
||||
case 50: return "R_MIPS_TLS_TPREL_LO16";
|
||||
|
||||
default: return "";
|
||||
}
|
||||
case EM_PPC:
|
||||
|
Loading…
Reference in New Issue
Block a user