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