aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleloader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/moduleloader.h')
-rw-r--r--include/linux/moduleloader.h36
1 files changed, 4 insertions, 32 deletions
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h
index 560ca53a75f..b2be02ebf45 100644
--- a/include/linux/moduleloader.h
+++ b/include/linux/moduleloader.h
@@ -28,49 +28,21 @@ void *module_alloc(unsigned long size);
28/* Free memory returned from module_alloc. */ 28/* Free memory returned from module_alloc. */
29void module_free(struct module *mod, void *module_region); 29void module_free(struct module *mod, void *module_region);
30 30
31/* 31/* Apply the given relocation to the (simplified) ELF. Return -error
32 * Apply the given relocation to the (simplified) ELF. Return -error 32 or 0. */
33 * or 0.
34 */
35#ifdef CONFIG_MODULES_USE_ELF_REL
36int apply_relocate(Elf_Shdr *sechdrs, 33int apply_relocate(Elf_Shdr *sechdrs,
37 const char *strtab, 34 const char *strtab,
38 unsigned int symindex, 35 unsigned int symindex,
39 unsigned int relsec, 36 unsigned int relsec,
40 struct module *mod); 37 struct module *mod);
41#else
42static inline int apply_relocate(Elf_Shdr *sechdrs,
43 const char *strtab,
44 unsigned int symindex,
45 unsigned int relsec,
46 struct module *me)
47{
48 printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name);
49 return -ENOEXEC;
50}
51#endif
52 38
53/* 39/* Apply the given add relocation to the (simplified) ELF. Return
54 * Apply the given add relocation to the (simplified) ELF. Return 40 -error or 0 */
55 * -error or 0
56 */
57#ifdef CONFIG_MODULES_USE_ELF_RELA
58int apply_relocate_add(Elf_Shdr *sechdrs, 41int apply_relocate_add(Elf_Shdr *sechdrs,
59 const char *strtab, 42 const char *strtab,
60 unsigned int symindex, 43 unsigned int symindex,
61 unsigned int relsec, 44 unsigned int relsec,
62 struct module *mod); 45 struct module *mod);
63#else
64static inline int apply_relocate_add(Elf_Shdr *sechdrs,
65 const char *strtab,
66 unsigned int symindex,
67 unsigned int relsec,
68 struct module *me)
69{
70 printk(KERN_ERR "module %s: REL relocation unsupported\n", me->name);
71 return -ENOEXEC;
72}
73#endif
74 46
75/* Any final processing of module before access. Return -error or 0. */ 47/* Any final processing of module before access. Return -error or 0. */
76int module_finalize(const Elf_Ehdr *hdr, 48int module_finalize(const Elf_Ehdr *hdr,