parisc: Handle R_PARISC_PCREL32 relocation in kernel modules
Helge Deller
maintainerPATCH 1/1 parisc: Handle R_PARISC_PCREL32 relocation in kernel modules
Commit 0de7985 (parisc: Use generic extable search and sort routines) changed the exception tables to use 32bit relative offsets.
With that change, the kernel needs to handle R_PARISC_PCREL32 relocations which this patch adds.
Signed-off-by Helge Deller <[email protected]>
arch/parisc/kernel/module.c +4 -0
@@ -788,6 +788,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,CHECK_RELOC (val,22 ); *loc = (*loc & ~0x3ff1ffd ) |reassemble_22 (val);break ; +case R_PARISC_PCREL32 : +/* 32-bit PC relative address */ + *loc = val - dot -8 + addend; +break ;case R_PARISC_DIR64 :/* 64-bit effective address */ *loc64 = val + addend;