Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ard Biesheuvel and committed by
Nathan Chancellor
ff79d31e 6eac13c8

+4
+2
arch/mips/boot/tools/relocs.c
··· 79 79 REL_TYPE(R_MIPS_HIGHEST), 80 80 REL_TYPE(R_MIPS_PC21_S2), 81 81 REL_TYPE(R_MIPS_PC26_S2), 82 + REL_TYPE(R_MIPS_PC32), 82 83 #undef REL_TYPE 83 84 }; 84 85 const char *name = "unknown type rel type name"; ··· 523 522 case R_MIPS_PC16: 524 523 case R_MIPS_PC21_S2: 525 524 case R_MIPS_PC26_S2: 525 + case R_MIPS_PC32: 526 526 /* 527 527 * NONE can be ignored and PC relative relocations don't 528 528 * need to be adjusted.
+2
arch/mips/include/asm/elf.h
··· 123 123 #define R_MIPS_LOVENDOR 100 124 124 #define R_MIPS_HIVENDOR 127 125 125 126 + #define R_MIPS_PC32 248 127 + 126 128 #define SHN_MIPS_ACCOMON 0xff00 /* Allocated common symbols */ 127 129 #define SHN_MIPS_TEXT 0xff01 /* Allocated test symbols. */ 128 130 #define SHN_MIPS_DATA 0xff02 /* Allocated data symbols. */