From ad8319ea4647c897c837643a611714a83d8f6a0f Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Thu, 4 Feb 2016 13:05:04 +0000 Subject: MIPS: Support R_MIPS_PC{21,26} rela-style relocs MIPS64 code uses rela-style relocs, and MIPS64r6 modules may include the new R_MIPS_PC21 & R_MIPS_PC26 relocations. We thus need to support these relocations in order to load MIPS64r6 kernel modules. They are similar to the existing R_MIPS_PC16 relocation but applying to a wider field. Implement support for them by genericising the existing R_MIPS_PC16 implementation such that it can be used for different field widths, and calling it for all 3 reloc types. Signed-off-by: Paul Burton Cc: Maciej W. Rozycki Cc: Kees Cook Cc: James Hogan Cc: Alex Smith Cc: Steven J. Hill Cc: Andrew Morton Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12434/ Signed-off-by: Ralf Baechle --- arch/mips/include/asm/elf.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/mips/include/asm/elf.h') diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index e090fc388e02..1bcbadb445fb 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h @@ -110,6 +110,11 @@ */ #define R_MIPS_CALLHI16 30 #define R_MIPS_CALLLO16 31 +/* + * Introduced for MIPSr6. + */ +#define R_MIPS_PC21_S2 60 +#define R_MIPS_PC26_S2 61 /* * This range is reserved for vendor specific relocations. */ -- cgit v1.2.3