Skip to content

Commit 592570c

Browse files
committed
parisc: Handle R_PARISC_PCREL32 relocations in kernel modules
Commit 0de7985 (parisc: Use generic extable search and sort routines) changed the exception tables to use 32bit relative offsets. This patch now adds support to the kernel module loader to handle such R_PARISC_PCREL32 relocations for 32- and 64-bit modules. Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 3c96888 commit 592570c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎arch/parisc/kernel/module.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
660660
}
661661
*loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
662662
break;
663+
case R_PARISC_PCREL32:
664+
/* 32-bit PC relative address */
665+
*loc = val - dot - 8 + addend;
666+
break;
663667

664668
default:
665669
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
@@ -788,6 +792,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
788792
CHECK_RELOC(val, 22);
789793
*loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
790794
break;
795+
case R_PARISC_PCREL32:
796+
/* 32-bit PC relative address */
797+
*loc = val - dot - 8 + addend;
798+
break;
791799
case R_PARISC_DIR64:
792800
/* 64-bit effective address */
793801
*loc64 = val + addend;

0 commit comments

Comments
 (0)