History

parisc: Handle R_PARISC_PCREL32 relocations in kernel modules

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.

Helge Deller committed 10 years ago

Commit 592570c1 parent 3c968881 file · +8 −0Browse files

Unified · Split

arch/parisc/kernel/module.c+8−0
@@ -660,6 +660,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, · 659 unmodified lines
660660 }
661661 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
662662 break;
663+ case R_PARISC_PCREL32:
664+ /* 32-bit PC relative address */
665+ *loc = val - dot - 8 + addend;
666+ break;
663667
664668 default:
665669 printk(KERN_ERR "module %s: Unknown relocation: %u\n",
@@ -788,6 +792,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, · 122 unmodified lines
788792 CHECK_RELOC(val, 22);
789793 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
790794 break;
795+ case R_PARISC_PCREL32:
796+ /* 32-bit PC relative address */
797+ *loc = val - dot - 8 + addend;
798+ break;
791799 case R_PARISC_DIR64:
792800 /* 64-bit effective address */
793801 *loc64 = val + addend;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t