projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d308979
)
[PATCH] ppc64: Add R_PPC64_TOC16 module reloc
author
Peter Bergner
<
[email protected]
>
Tue, 11 Oct 2005 16:28:24 +0000
(09:28 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 11 Oct 2005 16:46:54 +0000
(09:46 -0700)
Newer gcc's are generating this relocation, so the module loader needs to
handle it.
Signed-off-by: Peter Bergner <
[email protected]
>
Signed-off-by: Anton Blanchard <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/ppc64/kernel/module.c
patch
|
blob
|
history
diff --git
a/arch/ppc64/kernel/module.c
b/arch/ppc64/kernel/module.c
index c683bf88e6905ee808be85b44a9b32857595e653..928b8581fcb043142c088052885b3f5b671ec4cf 100644
(file)
--- 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);