[PATCH] objtool: remove duplicate case value R_PPC64_REL32

From: Kexy Biscuit
Date: Tue Feb 11 2025 - 09:27:55 EST


In arch/powerpc/include/uapi/asm/elf.h, R_PPC64_REL32 is defined as a
macro to R_PPC_REL32, makes the case value here being duplicate and
creates the following error...

arch/powerpc/decode.c: In function ‘arch_reloc_size’:
arch/powerpc/decode.c:114:9: error: duplicate case value
114 | case R_PPC64_REL32:
| ^~~~
arch/powerpc/decode.c:113:9: note: previously used here
113 | case R_PPC_REL32:
| ^~~~

Remove the duplicate case value to fix the error.

Fixes: "FROMLIST: objtool: Handle different entry size of rodata"
Signed-off-by: Kexy Biscuit <kexybiscuit@xxxxxxx>
---
This patch is required for this series to build on powerpc, however I'm
not sure if it's the preferred way... Please advise.

tools/objtool/arch/powerpc/decode.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/tools/objtool/arch/powerpc/decode.c b/tools/objtool/arch/powerpc/decode.c
index 3c95dd74fca0..7c0bf2429067 100644
--- a/tools/objtool/arch/powerpc/decode.c
+++ b/tools/objtool/arch/powerpc/decode.c
@@ -111,7 +111,6 @@ unsigned int arch_reloc_size(struct reloc *reloc)
{
switch (reloc_type(reloc)) {
case R_PPC_REL32:
- case R_PPC64_REL32:
case R_PPC_ADDR32:
case R_PPC_UADDR32:
case R_PPC_PLT32:
--
2.48.1