| 1 | #ifndef _LINUX_MODULELOADER_H
|
| 2 | #define _LINUX_MODULELOADER_H
|
| 3 |
|
| 4 |
|
| 5 | #include <linux/module.h>
|
| 6 | #include <linux/elf.h>
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 | int module_frob_arch_sections(Elf_Ehdr *hdr,
|
| 12 | Elf_Shdr *sechdrs,
|
| 13 | char *secstrings,
|
| 14 | struct module *mod);
|
| 15 |
|
| 16 | |
| 17 | sections. Returns NULL on failure.
|
| 18 | void *module_alloc(unsigned long size);
|
| 19 |
|
| 20 |
|
| 21 | void module_free(struct module *mod, void *module_region);
|
| 22 |
|
| 23 | |
| 24 | or 0.
|
| 25 | int apply_relocate(Elf_Shdr *sechdrs,
|
| 26 | const char *strtab,
|
| 27 | unsigned int symindex,
|
| 28 | unsigned int relsec,
|
| 29 | struct module *mod);
|
| 30 |
|
| 31 | |
| 32 | -error or 0
|
| 33 | int apply_relocate_add(Elf_Shdr *sechdrs,
|
| 34 | const char *strtab,
|
| 35 | unsigned int symindex,
|
| 36 | unsigned int relsec,
|
| 37 | struct module *mod);
|
| 38 |
|
| 39 |
|
| 40 | int module_finalize(const Elf_Ehdr *hdr,
|
| 41 | const Elf_Shdr *sechdrs,
|
| 42 | struct module *mod);
|
| 43 |
|
| 44 |
|
| 45 | void module_arch_cleanup(struct module *mod);
|
| 46 |
|
| 47 | #endif
|