19 #include <linux/elf.h>
22 #include <linux/string.h>
23 #include <linux/kernel.h>
24 #include <linux/slab.h>
29 #define DEBUGP(fmt , ...)
32 #ifdef CONFIG_ETRAX_KMALLOCED_MODULES
49 unsigned int symindex,
54 Elf32_Rela *rela = (
void *)sechdrs[relsec].sh_addr;
56 DEBUGP (
"Applying add relocate section %u to %u\n", relsec,
57 sechdrs[relsec].sh_info);
59 for (i = 0; i < sechdrs[relsec].
sh_size /
sizeof (*rela); i++) {
62 = ((
void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
74 *loc = sym->
st_value - (unsigned)loc + rela[i].r_addend - 4;