[RFC,v2,4/4] RX: rx-linux target FDPIC support

Message ID 20260316093151.360635-5-yoshinori.sato@nifty.com
State New
Headers
Series Renesas RX FDPIC support |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm warning Skipped because it is an RFC
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 warning Skipped because it is an RFC

Commit Message

Yoshinori Sato March 16, 2026, 9:31 a.m. UTC
  * elf/rx.h: Add FDPIC relocations. and FDPIC type.

Signed-off-by: Yoshinori Sato <yoshinori.sato@nifty.com>
---
 include/elf/rx.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
  

Patch

diff --git a/include/elf/rx.h b/include/elf/rx.h
index a79ac26f080..8b70821f559 100644
--- a/include/elf/rx.h
+++ b/include/elf/rx.h
@@ -55,6 +55,19 @@  START_RELOC_NUMBERS (elf_rx_reloc_type)
   RELOC_NUMBER (R_RX_DIR16_REV,    0x11)
   RELOC_NUMBER (R_RX_DIR3U_PCREL,  0x12)
 
+  /* PIC stuff */
+  RELOC_NUMBER (R_RX_GOT,	   0x13)
+  RELOC_NUMBER (R_RX_PLT,	   0x14)
+  RELOC_NUMBER (R_RX_COPY,	   0x15)
+  RELOC_NUMBER (R_RX_GLOB_DAT,     0x16)
+  RELOC_NUMBER (R_RX_JMP_SLOT,     0x17)
+  RELOC_NUMBER (R_RX_RELATIVE,     0x18)
+  RELOC_NUMBER (R_RX_GOTOFF,       0x19)
+  RELOC_NUMBER (R_RX_GOTFUNCDESC,  0x1a)
+  RELOC_NUMBER (R_RX_GOTOFFFUNCDESC, 0x1b)
+  RELOC_NUMBER (R_RX_FUNCDESC,     0x1c)
+  RELOC_NUMBER (R_RX_FUNCDESC_VALUE, 0x1d)
+
   /* These are extensions added by Red Hat.  */
   RELOC_NUMBER (R_RX_RH_3_PCREL,   0x20) /* Like R_RX_DIR8S_PCREL but only 3-bits.  */
   RELOC_NUMBER (R_RX_RH_16_OP,     0x21) /* Like R_RX_DIR16 but for opcodes - always big endian.  */
@@ -113,6 +126,8 @@  END_RELOC_NUMBERS (R_RX_max)
 #define EF_RX_CPU_RX	0x00000079      /* FIXME: this collides with the E_FLAG_RX_... values below.  */
 #define EF_RX_CPU_MASK	0x000003FF	/* specific cpu bits.  */
 #define EF_RX_ALL_FLAGS	(EF_RX_CPU_MASK)
+#define EF_RX_PIC	0x1000
+#define EF_RX_FDPIC	0x2000
 
 /* Values for the e_flags field in the ELF header.  */
 #define E_FLAG_RX_64BIT_DOUBLES		(1 << 0)