MIPS: Add relocation types
authorYing Huang <ying.huang@oss.cipunited.com>
Thu, 31 Aug 2023 03:22:48 +0000 (23:22 -0400)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 27 Sep 2023 16:57:11 +0000 (13:57 -0300)
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/elf.h

index 1417cfd..7b4a8fe 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1978,10 +1978,68 @@ typedef struct
 #define R_MIPS_TLS_TPREL_HI16  49      /* TP-relative offset, high 16 bits */
 #define R_MIPS_TLS_TPREL_LO16  50      /* TP-relative offset, low 16 bits */
 #define R_MIPS_GLOB_DAT                51
+#define R_MIPS_PC21_S2         60
+#define R_MIPS_PC26_S2         61
+#define R_MIPS_PC18_S3         62
+#define R_MIPS_PC19_S2         63
+#define R_MIPS_PCHI16          64
+#define R_MIPS_PCLO16          65
+#define R_MIPS16_26            100
+#define R_MIPS16_GPREL         101
+#define R_MIPS16_GOT16         102
+#define R_MIPS16_CALL16                103
+#define R_MIPS16_HI16          104
+#define R_MIPS16_LO16          105
+#define R_MIPS16_TLS_GD                106
+#define R_MIPS16_TLS_LDM       107
+#define R_MIPS16_TLS_DTPREL_HI16       108
+#define R_MIPS16_TLS_DTPREL_LO16       109
+#define R_MIPS16_TLS_GOTTPREL  110
+#define R_MIPS16_TLS_TPREL_HI16        111
+#define R_MIPS16_TLS_TPREL_LO16        112
+#define R_MIPS16_PC16_S1       113
 #define R_MIPS_COPY            126
 #define R_MIPS_JUMP_SLOT        127
+#define R_MIPS_RELATIVE                128
+#define R_MICROMIPS_26_S1      133
+#define R_MICROMIPS_HI16       134
+#define R_MICROMIPS_LO16       135
+#define R_MICROMIPS_GPREL16    136
+#define R_MICROMIPS_LITERAL    137
+#define R_MICROMIPS_GOT16      138
+#define R_MICROMIPS_PC7_S1     139
+#define R_MICROMIPS_PC10_S1    140
+#define R_MICROMIPS_PC16_S1    141
+#define R_MICROMIPS_CALL16     142
+#define R_MICROMIPS_GOT_DISP   145
+#define R_MICROMIPS_GOT_PAGE   146
+#define R_MICROMIPS_GOT_OFST   147
+#define R_MICROMIPS_GOT_HI16   148
+#define R_MICROMIPS_GOT_LO16   149
+#define R_MICROMIPS_SUB                150
+#define R_MICROMIPS_HIGHER     151
+#define R_MICROMIPS_HIGHEST    152
+#define R_MICROMIPS_CALL_HI16  153
+#define R_MICROMIPS_CALL_LO16  154
+#define R_MICROMIPS_SCN_DISP   155
+#define R_MICROMIPS_JALR       156
+#define R_MICROMIPS_HI0_LO16   157
+#define R_MICROMIPS_TLS_GD     162
+#define R_MICROMIPS_TLS_LDM    163
+#define R_MICROMIPS_TLS_DTPREL_HI16    164
+#define R_MICROMIPS_TLS_DTPREL_LO16    165
+#define R_MICROMIPS_TLS_GOTTPREL       166
+#define R_MICROMIPS_TLS_TPREL_HI16     169
+#define R_MICROMIPS_TLS_TPREL_LO16     170
+#define R_MICROMIPS_GPREL7_S2  172
+#define R_MICROMIPS_PC23_S2    173
+#define R_MIPS_PC32            248
+#define R_MIPS_EH              249
+#define R_MIPS_GNU_REL16_S2    250
+#define R_MIPS_GNU_VTINHERIT   253
+#define R_MIPS_GNU_VTENTRY     254
 /* Keep this the last entry.  */
-#define R_MIPS_NUM             128
+#define R_MIPS_NUM             255
 
 /* Legal values for p_type field of Elf32_Phdr.  */