28 #include <linux/elf.h>
32 #include <linux/string.h>
33 #include <linux/kernel.h>
34 #include <asm/unaligned.h>
39 unsigned int symindex,
44 Elf32_Rela *rel = (
void *)sechdrs[relsec].sh_addr;
50 pr_debug(
"Applying relocate section %u to %u\n", relsec,
51 sechdrs[relsec].sh_info);
52 for (i = 0; i < sechdrs[relsec].
sh_size /
sizeof(*rel); i++) {
54 location = (
void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
58 sym = (
Elf32_Sym *)sechdrs[symindex].sh_addr
62 #ifdef CONFIG_SUPERH64
80 relocation = (relocation - (
Elf32_Addr) location);
86 *location = (*location & ~0x3fffc00) |
87 ((relocation & 0xffff) << 10);
90 *location = (*location & ~0x3fffc00) |
91 (((relocation >> 16) & 0xffff) << 10);
95 *location = (*location & ~0x3fffc00) |
96 ((relocation & 0xffff) << 10);
100 *location = (*location & ~0x3fffc00) |
101 (((relocation >> 16) & 0xffff) << 10);