summaryrefslogtreecommitdiff
path: root/arch/mips/boot
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2026-01-16 10:34:01 +0100
committerNathan Chancellor <nathan@kernel.org>2026-01-22 15:58:17 -0700
commitff79d31eb536f6d87bcbc09287d54d5606bf6dbe (patch)
tree2754cdad696f811af1148667e420a035672a6e43 /arch/mips/boot
parent6eac13c876805f61bbb588eaff5ada0b6dc603e8 (diff)
mips: Add support for PC32 relocations in vmlinux
MIPS supports PC32 relocations like most other architectures, which will be used by kallsyms to make its symbol references visible to the linker. Given that these are place-relative, they can be ignored by the 'relocs' tool, just like other PC type relocations. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/20260116093359.2442297-5-ardb+git@google.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'arch/mips/boot')
-rw-r--r--arch/mips/boot/tools/relocs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/boot/tools/relocs.c b/arch/mips/boot/tools/relocs.c
index 9863e1d5c62e..30809f47415a 100644
--- a/arch/mips/boot/tools/relocs.c
+++ b/arch/mips/boot/tools/relocs.c
@@ -79,6 +79,7 @@ static const char *rel_type(unsigned type)
REL_TYPE(R_MIPS_HIGHEST),
REL_TYPE(R_MIPS_PC21_S2),
REL_TYPE(R_MIPS_PC26_S2),
+ REL_TYPE(R_MIPS_PC32),
#undef REL_TYPE
};
const char *name = "unknown type rel type name";
@@ -522,6 +523,7 @@ static int do_reloc(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
case R_MIPS_PC16:
case R_MIPS_PC21_S2:
case R_MIPS_PC26_S2:
+ case R_MIPS_PC32:
/*
* NONE can be ignored and PC relative relocations don't
* need to be adjusted.