Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250104084144.8928-1-huajingyun@loongson.cn>
Date: Sat,  4 Jan 2025 16:41:44 +0800
From: Jingyun Hua <huajingyun@...ngson.cn>
To: musl@...ts.openwall.com
Cc: lixing@...ngson.cn,
	wanghongliang@...ngson.cn,
	dalias@...c.org,
	Jingyun Hua <huajingyun@...ngson.cn>
Subject: [PATCH] LoongArch64: add new reloc types and NT_LOONGARCH_HW_* into elf.h

These new LoongArch reloc types(101 to 126) have been added in LoongArch psABI
v2.30 and NT_LOONGARCH_HW_BREAK/NT_LOONGARCH_HW_WATCH sync Linux 6.12 elf.h.

Link:
https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#relocation-types
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/elf.h?h=v6.12#n458

Also refer to glibc:
https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/elf.h
---
 include/elf.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/include/elf.h b/include/elf.h
index 8b622f63..a3635d03 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -712,6 +712,8 @@ typedef struct {
 #define NT_LOONGARCH_LSX	0xa02
 #define NT_LOONGARCH_LASX	0xa03
 #define NT_LOONGARCH_LBT	0xa04
+#define NT_LOONGARCH_HW_BREAK	0xa05
+#define NT_LOONGARCH_HW_WATCH	0xa06
 
 
 
@@ -3406,6 +3408,32 @@ enum
 #define R_LARCH_TLS_GD_HI20                 98
 #define R_LARCH_32_PCREL                    99
 #define R_LARCH_RELAX                       100
+#define R_LARCH_DELETE                      101
+#define R_LARCH_ALIGN                       102
+#define R_LARCH_PCREL20_S2                  103
+#define R_LARCH_CFA                         104
+#define R_LARCH_ADD6                        105
+#define R_LARCH_SUB6                        106
+#define R_LARCH_ADD_ULEB128                 107
+#define R_LARCH_SUB_ULEB128                 108
+#define R_LARCH_64_PCREL                    109
+#define R_LARCH_CALL36                      110
+#define R_LARCH_TLS_DESC_PC_HI20            111
+#define R_LARCH_TLS_DESC_PC_LO12            112
+#define R_LARCH_TLS_DESC64_PC_LO20          113
+#define R_LARCH_TLS_DESC64_PC_HI12          114
+#define R_LARCH_TLS_DESC_HI20               115
+#define R_LARCH_TLS_DESC_LO12               116
+#define R_LARCH_TLS_DESC64_LO20             117
+#define R_LARCH_TLS_DESC64_HI12             118
+#define R_LARCH_TLS_DESC_LD                 119
+#define R_LARCH_TLS_DESC_CALL               120
+#define R_LARCH_TLS_LE_HI20_R               121
+#define R_LARCH_TLS_LE_ADD_R                122
+#define R_LARCH_TLS_LE_LO12_R               123
+#define R_LARCH_TLS_LD_PCREL20_S2           124
+#define R_LARCH_TLS_GD_PCREL20_S2           125
+#define R_LARCH_TLS_DESC_PCREL20_S2         126
 
 #ifdef __cplusplus
 }
-- 
2.47.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.