diff options
author | Helge Deller <deller@gmx.de> | 2019-06-08 20:04:46 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-06-08 20:06:20 +0200 |
commit | d2ba3b1714d754f190ac0527713f9b44513b5857 (patch) | |
tree | 617685f312be53f72de93f9c03fb6bb57c460441 /arch/parisc/kernel/module.c | |
parent | Merge tag 'drm-fixes-2019-06-07-1' of git://anongit.freedesktop.org/drm/drm (diff) | |
download | linux-d2ba3b1714d754f190ac0527713f9b44513b5857.tar.xz linux-d2ba3b1714d754f190ac0527713f9b44513b5857.zip |
parisc: Fix module loading error with JUMP_LABEL feature
Commit 62217beb394e ("parisc: Add static branch and JUMP_LABEL feature") missed
to add code to handle PCREL64 relocations which are generated when creating a
jump label on a 64-bit kernel.
This patch fixes module load errors like this one:
# modprobe -v ipv6
insmod /lib/modules/5.2.0-rc1-JeR/kernel/net/ipv6/ipv6.ko
modprobe: ERROR: could not insert 'ipv6': Exec format error
dmesg reports:
module ipv6: Unknown relocation: 72
Reported-by: Jeroen Roovers <jer@gentoo.org>
Tested-by: Jeroen Roovers <jer@gentoo.org>
Fixes: 62217beb394e ("parisc: Add static branch and JUMP_LABEL feature")
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r-- | arch/parisc/kernel/module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index f241ded9239b..1f0f29a289d3 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -786,6 +786,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, /* 32-bit PC relative address */ *loc = val - dot - 8 + addend; break; + case R_PARISC_PCREL64: + /* 64-bit PC relative address */ + *loc64 = val - dot - 8 + addend; + break; case R_PARISC_DIR64: /* 64-bit effective address */ *loc64 = val + addend; |