Skip to content

Commit d2ba3b1

Browse files
committed
parisc: Fix module loading error with JUMP_LABEL feature
Commit 62217be ("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 <[email protected]> Tested-by: Jeroen Roovers <[email protected]> Fixes: 62217be ("parisc: Add static branch and JUMP_LABEL feature") Signed-off-by: Helge Deller <[email protected]>
1 parent 79c3ba3 commit d2ba3b1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/parisc/kernel/module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
786786
/* 32-bit PC relative address */
787787
*loc = val - dot - 8 + addend;
788788
break;
789+
case R_PARISC_PCREL64:
790+
/* 64-bit PC relative address */
791+
*loc64 = val - dot - 8 + addend;
792+
break;
789793
case R_PARISC_DIR64:
790794
/* 64-bit effective address */
791795
*loc64 = val + addend;

0 commit comments

Comments
 (0)