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
660 }660 }
661 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);661 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
662 break;662 break;
663 case R_PARISC_PCREL32:
664 /* 32-bit PC relative address */
665 *loc = val - dot - 8 + addend;
666 break;
663 667
664 default:668 default:
665 printk(KERN_ERR "module %s: Unknown relocation: %u\n",669 printk(KERN_ERR "module %s: Unknown relocation: %u\n",
@@ -788,6 +792,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, · 122 unmodified lines
788 CHECK_RELOC(val, 22);792 CHECK_RELOC(val, 22);
789 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);793 *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
790 break;794 break;
795 case R_PARISC_PCREL32:
796 /* 32-bit PC relative address */
797 *loc = val - dot - 8 + addend;
798 break;
791 case R_PARISC_DIR64:799 case R_PARISC_DIR64:
792 /* 64-bit effective address */800 /* 64-bit effective address */
793 *loc64 = val + addend;801 *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