11 #include <linux/string.h>
12 #include <linux/kernel.h>
17 #define DEBUGP(fmt...)
24 unsigned int symindex,
29 Elf32_Rel *rel = (
void *)sechdrs[relsec].sh_addr;
33 DEBUGP(
"Applying relocate section %u to %u\n", relsec,
34 sechdrs[relsec].sh_info);
35 for (i = 0; i < sechdrs[relsec].
sh_size /
sizeof(*rel); i++) {
37 location = (
void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
41 sym = (
Elf32_Sym *)sechdrs[symindex].sh_addr
64 unsigned int symindex,
69 Elf32_Rela *rel = (
void *)sechdrs[relsec].sh_addr;
73 DEBUGP(
"Applying relocate_add section %u to %u\n", relsec,
74 sechdrs[relsec].sh_info);
75 for (i = 0; i < sechdrs[relsec].
sh_size /
sizeof(*rel); i++) {
77 location = (
void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
81 sym = (
Elf32_Sym *)sechdrs[symindex].sh_addr
106 module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end);
118 for (fixup = start; fixup <
end; fixup++) {
119 switch (fixup->
type) {