Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9810
b: refs/heads/master
c: 9149ccf
h: refs/heads/master
v: v3
  • Loading branch information
Peter Bergner authored and Linus Torvalds committed Oct 11, 2005
1 parent 4058bcf commit f25152e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3089792f6ee38cdc9e254a7cb2f8c8d7f38c20d
refs/heads/master: 9149ccfa3571eaa4a4b444777d67fc4ed3ebcf27
13 changes: 13 additions & 0 deletions trunk/arch/ppc64/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f25152e

Please sign in to comment.