summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/module.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-12 14:43:32 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-12 14:43:32 +1000
commitb6ec995a21a9428aef620b5adf46d047a18d88b8 (patch)
tree6719121e6605cbca524b687f47336b9bbf3b8d41 /arch/ppc64/kernel/module.c
parent3a5f8c5f788d68e325d9fe3c26f4df5a5aee838a (diff)
parentda64c6ee6bb71bfb3f09d9bb89ce1aa4b1ee7e89 (diff)
downloadop-kernel-dev-b6ec995a21a9428aef620b5adf46d047a18d88b8.zip
op-kernel-dev-b6ec995a21a9428aef620b5adf46d047a18d88b8.tar.gz
Merge from Linus' tree
Diffstat (limited to 'arch/ppc64/kernel/module.c')
-rw-r--r--arch/ppc64/kernel/module.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/module.c b/arch/ppc64/kernel/module.c
index c683bf8..928b858 100644
--- a/arch/ppc64/kernel/module.c
+++ b/arch/ppc64/kernel/module.c
@@ -341,6 +341,19 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
*(unsigned long *)location = my_r2(sechdrs, me);
break;
+ case R_PPC64_TOC16:
+ /* Subtact TOC pointer */
+ value -= my_r2(sechdrs, me);
+ if (value + 0x8000 > 0xffff) {
+ printk("%s: bad TOC16 relocation (%lu)\n",
+ me->name, value);
+ return -ENOEXEC;
+ }
+ *((uint16_t *) location)
+ = (*((uint16_t *) location) & ~0xffff)
+ | (value & 0xffff);
+ break;
+
case R_PPC64_TOC16_DS:
/* Subtact TOC pointer */
value -= my_r2(sechdrs, me);
OpenPOWER on IntegriCloud