Skip to content

Commit 5f65532

Browse files
Mikulas Patockahdeller
authored andcommitted
parisc: support R_PARISC_SECREL32 relocation in modules
The parisc kernel doesn't work with CONFIG_MODVERSIONS since the commit 71810db. It can't load modules with the error: "module unix: Unknown relocation: 41". The commit changes __kcrctab from 64-bit valus to 32-bit values. The assembler generates R_PARISC_SECREL32 secrel relocation for them and the module loader doesn't support this relocation. This patch adds the R_PARISC_SECREL32 relocation to the module loader. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 95422de commit 5f65532

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
@@ -620,6 +620,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
620620
*/
621621
*loc = fsel(val, addend);
622622
break;
623+
case R_PARISC_SECREL32:
624+
/* 32-bit section relative address. */
625+
*loc = fsel(val, addend);
626+
break;
623627
case R_PARISC_DPREL21L:
624628
/* left 21 bit of relative address */
625629
val = lrsel(val - dp, addend);
@@ -807,6 +811,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
807811
*/
808812
*loc = fsel(val, addend);
809813
break;
814+
case R_PARISC_SECREL32:
815+
/* 32-bit section relative address. */
816+
*loc = fsel(val, addend);
817+
break;
810818
case R_PARISC_FPTR64:
811819
/* 64-bit function address */
812820
if(in_local(me, (void *)(val + addend))) {

0 commit comments

Comments
 (0)