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
11int module_frob_arch_sections(Elf_Ehdr *hdr,
12 Elf_Shdr *sechdrs,
13 char *secstrings,
14 struct module *mod);
15
16
17unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section);
18
19
20
21void *module_alloc(unsigned long size);
22
23
24void module_free(struct module *mod, void *module_region);
25
26
27
28int apply_relocate(Elf_Shdr *sechdrs,
29 const char *strtab,
30 unsigned int symindex,
31 unsigned int relsec,
32 struct module *mod);
33
34
35
36int apply_relocate_add(Elf_Shdr *sechdrs,
37 const char *strtab,
38 unsigned int symindex,
39 unsigned int relsec,
40 struct module *mod);
41
42
43int module_finalize(const Elf_Ehdr *hdr,
44 const Elf_Shdr *sechdrs,
45 struct module *mod);
46
47
48void module_arch_cleanup(struct module *mod);
49
50#endif
51