diff mbox series

[v6,2/3] RISC-V: Add TLSDESC reloc definitions.

Message ID 20240329061834.40019-3-ishitatsuyuki@gmail.com
State New
Headers show
Series RISC-V: Implement TLS Descriptors. | expand

Commit Message

Tatsuyuki Ishi March 29, 2024, 6:18 a.m. UTC
---
 elf/elf.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Fangrui Song April 3, 2024, 5:10 a.m. UTC | #1
On Thu, Mar 28, 2024 at 11:19 PM Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
>
> ---
>  elf/elf.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 55b2e87860..649547b949 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -4080,6 +4080,7 @@ enum
>  #define R_RISCV_TLS_DTPREL64    9
>  #define R_RISCV_TLS_TPREL32    10
>  #define R_RISCV_TLS_TPREL64    11
> +#define R_RISCV_TLSDESC                12
>  #define R_RISCV_BRANCH         16
>  #define R_RISCV_JAL            17
>  #define R_RISCV_CALL           18
> @@ -4126,8 +4127,12 @@ enum
>  #define R_RISCV_PLT32          59
>  #define R_RISCV_SET_ULEB128    60
>  #define R_RISCV_SUB_ULEB128    61
> +#define R_RISCV_TLSDESC_HI20   62
> +#define R_RISCV_TLSDESC_LOAD_LO12      63
> +#define R_RISCV_TLSDESC_ADD_LO12       64
> +#define R_RISCV_TLSDESC_CALL   65
>
> -#define R_RISCV_NUM            62
> +#define R_RISCV_NUM            66
>
>  /* RISC-V specific values for the st_other field.  */
>  #define STO_RISCV_VARIANT_CC   0x80    /* Function uses variant calling
> --
> 2.44.0

Reviewed-by: Fangrui Song <maskray@google.com>
Andreas Schwab April 3, 2024, 8:03 a.m. UTC | #2
This should update the complete list, see <mvmzfwwauem.fsf@suse.de>.
diff mbox series

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 55b2e87860..649547b949 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -4080,6 +4080,7 @@  enum
 #define R_RISCV_TLS_DTPREL64	 9
 #define R_RISCV_TLS_TPREL32	10
 #define R_RISCV_TLS_TPREL64	11
+#define R_RISCV_TLSDESC		12
 #define R_RISCV_BRANCH		16
 #define R_RISCV_JAL		17
 #define R_RISCV_CALL		18
@@ -4126,8 +4127,12 @@  enum
 #define R_RISCV_PLT32		59
 #define R_RISCV_SET_ULEB128	60
 #define R_RISCV_SUB_ULEB128	61
+#define R_RISCV_TLSDESC_HI20	62
+#define R_RISCV_TLSDESC_LOAD_LO12	63
+#define R_RISCV_TLSDESC_ADD_LO12	64
+#define R_RISCV_TLSDESC_CALL	65
 
-#define R_RISCV_NUM		62
+#define R_RISCV_NUM		66
 
 /* RISC-V specific values for the st_other field.  */
 #define STO_RISCV_VARIANT_CC	0x80	/* Function uses variant calling