Nicholas Flintham | 1e3d311 | 2013-04-10 10:48:38 +0100 | [diff] [blame^] | 1 | #ifndef _LINUX_MODULELOADER_H |
| 2 | #define _LINUX_MODULELOADER_H |
| 3 | |
| 4 | #include <linux/module.h> |
| 5 | #include <linux/elf.h> |
| 6 | |
| 7 | |
| 8 | int module_frob_arch_sections(Elf_Ehdr *hdr, |
| 9 | Elf_Shdr *sechdrs, |
| 10 | char *secstrings, |
| 11 | struct module *mod); |
| 12 | |
| 13 | unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section); |
| 14 | |
| 15 | void *module_alloc(unsigned long size); |
| 16 | |
| 17 | void module_free(struct module *mod, void *module_region); |
| 18 | |
| 19 | int apply_relocate(Elf_Shdr *sechdrs, |
| 20 | const char *strtab, |
| 21 | unsigned int symindex, |
| 22 | unsigned int relsec, |
| 23 | struct module *mod); |
| 24 | |
| 25 | int apply_relocate_add(Elf_Shdr *sechdrs, |
| 26 | const char *strtab, |
| 27 | unsigned int symindex, |
| 28 | unsigned int relsec, |
| 29 | struct module *mod); |
| 30 | |
| 31 | int module_finalize(const Elf_Ehdr *hdr, |
| 32 | const Elf_Shdr *sechdrs, |
| 33 | struct module *mod); |
| 34 | |
| 35 | void module_arch_cleanup(struct module *mod); |
| 36 | |
| 37 | #endif |