]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
parisc: Handle R_PARISC_PCREL32 relocations in kernel modules
authorHelge Deller <deller@gmx.de>
Fri, 8 Apr 2016 20:10:35 +0000 (22:10 +0200)
committerHelge Deller <deller@gmx.de>
Fri, 8 Apr 2016 20:10:35 +0000 (22:10 +0200)
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>
arch/parisc/kernel/module.c

index b9d75d9fa9ace520e472874b5dcb0f0b0aad440e..a0ecdb4abcc878b3805d7a2d0f845272b1fc372d 100644 (file)
@@ -660,6 +660,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
                        }
                        *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
                        break;
+               case R_PARISC_PCREL32:
+                       /* 32-bit PC relative address */
+                       *loc = val - dot - 8 + addend;
+                       break;
 
                default:
                        printk(KERN_ERR "module %s: Unknown relocation: %u\n",
@@ -788,6 +792,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
                        CHECK_RELOC(val, 22);
                        *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
                        break;
+               case R_PARISC_PCREL32:
+                       /* 32-bit PC relative address */
+                       *loc = val - dot - 8 + addend;
+                       break;
                case R_PARISC_DIR64:
                        /* 64-bit effective address */
                        *loc64 = val + addend;