Commit f81a9940 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Greg Kroah-Hartman

parisc: support R_PARISC_SECREL32 relocation in modules

commit 5f655322 upstream.

The parisc kernel doesn't work with CONFIG_MODVERSIONS since the commit
71810db2. 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: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 13ad0be7
...@@ -620,6 +620,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, ...@@ -620,6 +620,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
*/ */
*loc = fsel(val, addend); *loc = fsel(val, addend);
break; break;
case R_PARISC_SECREL32:
/* 32-bit section relative address. */
*loc = fsel(val, addend);
break;
case R_PARISC_DPREL21L: case R_PARISC_DPREL21L:
/* left 21 bit of relative address */ /* left 21 bit of relative address */
val = lrsel(val - dp, addend); val = lrsel(val - dp, addend);
...@@ -807,6 +811,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, ...@@ -807,6 +811,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
*/ */
*loc = fsel(val, addend); *loc = fsel(val, addend);
break; break;
case R_PARISC_SECREL32:
/* 32-bit section relative address. */
*loc = fsel(val, addend);
break;
case R_PARISC_FPTR64: case R_PARISC_FPTR64:
/* 64-bit function address */ /* 64-bit function address */
if(in_local(me, (void *)(val + addend))) { if(in_local(me, (void *)(val + addend))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment