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