diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/moduleloader.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/moduleloader.h')
-rw-r--r-- | include/linux/moduleloader.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h new file mode 100644 index 000000000000..eb1033957486 --- /dev/null +++ b/include/linux/moduleloader.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef _LINUX_MODULELOADER_H | ||
2 | #define _LINUX_MODULELOADER_H | ||
3 | /* The stuff needed for archs to support modules. */ | ||
4 | |||
5 | #include <linux/module.h> | ||
6 | #include <linux/elf.h> | ||
7 | |||
8 | /* These must be implemented by the specific architecture */ | ||
9 | |||
10 | /* Adjust arch-specific sections. Return 0 on success. */ | ||
11 | int module_frob_arch_sections(Elf_Ehdr *hdr, | ||
12 | Elf_Shdr *sechdrs, | ||
13 | char *secstrings, | ||
14 | struct module *mod); | ||
15 | |||
16 | /* Allocator used for allocating struct module, core sections and init | ||
17 | sections. Returns NULL on failure. */ | ||
18 | void *module_alloc(unsigned long size); | ||
19 | |||
20 | /* Free memory returned from module_alloc. */ | ||
21 | void module_free(struct module *mod, void *module_region); | ||
22 | |||
23 | /* Apply the given relocation to the (simplified) ELF. Return -error | ||
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 | /* Apply the given add relocation to the (simplified) ELF. Return | ||
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 | /* Any final processing of module before access. Return -error or 0. */ | ||
40 | int module_finalize(const Elf_Ehdr *hdr, | ||
41 | const Elf_Shdr *sechdrs, | ||
42 | struct module *mod); | ||
43 | |||
44 | /* Any cleanup needed when module leaves. */ | ||
45 | void module_arch_cleanup(struct module *mod); | ||
46 | |||
47 | #endif | ||