Thread (53 messages) 53 messages, 8 authors, 2026-09-10

Re: [PATCH v5 16/24] powerpc/elf: Add 32-bit REL16 relocation definitions

flat view

From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Date: 2026-09-08 09:21:38
Also in: linux-kbuild, linux-mips, linux-mm, linux-riscv, linux-s390, linux-um, lkml, llvm, loongarch, rust-for-linux


Le 08/09/2026 à 08:33, Thomas Weißschuh a écrit :
These are used by userspace and are necessary for the vdsocheck tool.
They share the numbers with their 64-bit variants.

Also update the copy in tools/ so they can be used by vdsocheck.

Signed-off-by: Thomas Weißschuh <redacted>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
quoted hunk ↗ jump to hunk
---
  include/uapi/linux/elf-r.h       | 7 ++++++-
  tools/include/uapi/linux/elf-r.h | 7 ++++++-
  2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/elf-r.h b/include/uapi/linux/elf-r.h
index 72fc9045a5d4..170888422400 100644
--- a/include/uapi/linux/elf-r.h
+++ b/include/uapi/linux/elf-r.h
@@ -182,8 +182,13 @@
  #define R_PPC_GOT_DTPREL16_HI	93 /* half16*	(sym+add)@got@dtprel@h */
  #define R_PPC_GOT_DTPREL16_HA	94 /* half16*	(sym+add)@got@dtprel@ha */
  
+#define R_PPC_REL16		249
+#define R_PPC_REL16_LO		250
+#define R_PPC_REL16_HI		251
+#define R_PPC_REL16_HA		252
+
  /* keep this the last entry. */
-#define R_PPC_NUM		95
+#define R_PPC_NUM		253
  
  /* PowerPC64 relocations defined by the ABIs */
  #define R_PPC64_NONE    R_PPC_NONE
diff --git a/tools/include/uapi/linux/elf-r.h b/tools/include/uapi/linux/elf-r.h
index 72fc9045a5d4..170888422400 100644
--- a/tools/include/uapi/linux/elf-r.h
+++ b/tools/include/uapi/linux/elf-r.h
@@ -182,8 +182,13 @@
  #define R_PPC_GOT_DTPREL16_HI	93 /* half16*	(sym+add)@got@dtprel@h */
  #define R_PPC_GOT_DTPREL16_HA	94 /* half16*	(sym+add)@got@dtprel@ha */
  
+#define R_PPC_REL16		249
+#define R_PPC_REL16_LO		250
+#define R_PPC_REL16_HI		251
+#define R_PPC_REL16_HA		252
+
  /* keep this the last entry. */
-#define R_PPC_NUM		95
+#define R_PPC_NUM		253
  
  /* PowerPC64 relocations defined by the ABIs */
  #define R_PPC64_NONE    R_PPC_NONE
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help