5 #include <linux/string.h>
6 #include <linux/kernel.h>
11 #define DEBUGP(fmt...)
16 unsigned int symindex,
21 Elf32_Rela *rela = (
void *)sechdrs[relsec].sh_addr;
23 DEBUGP(
"Applying relocate section %u to %u\n", relsec,
24 sechdrs[relsec].sh_info);
25 for (i = 0; i < sechdrs[relsec].
sh_size /
sizeof(*rela); i++) {
38 *loc = (*loc & 0xff000000) | ((*loc & 0xffffff) +
v);
49 v -= (
unsigned long)loc + 2;
54 *(
unsigned short *)loc = v;
57 v -= (
unsigned long)loc + 1;
62 *(
unsigned char *)loc = v;