[v11,3/3] MIPS: Add relocation types

Message ID 20230831032302.3736352-4-ying.huang@oss.cipunited.com
State Committed
Commit a6e8ceb3bb532236e1eecd0bb0ee8e4b7fd5ff7c
Headers
Series [v11,1/3] MIPS: Add ELF file header flags |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed

Commit Message

Ying Huang Aug. 31, 2023, 3:22 a.m. UTC
  From: Ying Huang <ying.huang@oss.cipunited.com>

---
 elf/elf.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 59 insertions(+), 1 deletion(-)
  

Comments

Adhemerval Zanella Netto Sept. 21, 2023, 6:50 a.m. UTC | #1
It does not trigger any build/check regression and it seems to be
in sync with binutils, so it should be ok.

On 31/08/23 00:22, Ying Huang wrote:
> From: Ying Huang <ying.huang@oss.cipunited.com>
> 
> ---
>  elf/elf.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 59 insertions(+), 1 deletion(-)
> 
> diff --git a/elf/elf.h b/elf/elf.h
> index 1417cfd83f..7b4a8fe43e 100644
> --- 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.  */
>
  

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 1417cfd83f..7b4a8fe43e 100644
--- 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.  */