From ff648c6aa5220dcee0ccdc88b4770015f559e171 Mon Sep 17 00:00:00 2001 From: emaste Date: Mon, 30 May 2016 20:51:51 +0000 Subject: [PATCH] Add and correct MIPS relocation types The correct names for R_MIPS_GOT_HI16 and R_MIPS_GOT_LO16 have a _ after GOT. The nonstandard names (R_MIPS_GOTHI16, R_MIPS_GOTLO16) in the FreeBSD elf_common.h header also had incorrect values and were not used in the tree, so just remove them. Add other MIPS relocation types found in FreeBSD/mips64 object files. Reviewed by: imp, jmallett MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6561 --- sys/sys/elf_common.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 6793d5fb3e92..f4017e725d67 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -1037,10 +1037,16 @@ typedef struct { #define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ #define R_MIPS_GPREL32 12 /* GP relative 32 bit */ #define R_MIPS_64 18 /* Direct 64 bit */ -#define R_MIPS_GOTHI16 21 /* GOT HI 16 bit */ -#define R_MIPS_GOTLO16 22 /* GOT LO 16 bit */ +#define R_MIPS_GOT_DISP 19 +#define R_MIPS_GOT_PAGE 20 +#define R_MIPS_GOT_OFST 21 +#define R_MIPS_GOT_HI16 22 /* GOT HI 16 bit */ +#define R_MIPS_GOT_LO16 23 /* GOT LO 16 bit */ +#define R_MIPS_SUB 24 #define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */ #define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */ +#define R_MIPS_JALR 37 +#define R_MIPS_TLS_GD 42 #define R_PPC_NONE 0 /* No relocation. */ #define R_PPC_ADDR32 1