diff options
Diffstat (limited to 'arch/arm/kernel/module.c')
-rw-r--r-- | arch/arm/kernel/module.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 016d6a0830a..09326b62780 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -43,25 +43,7 @@ void *module_alloc(unsigned long size) | |||
43 | GFP_KERNEL, PAGE_KERNEL_EXEC, -1, | 43 | GFP_KERNEL, PAGE_KERNEL_EXEC, -1, |
44 | __builtin_return_address(0)); | 44 | __builtin_return_address(0)); |
45 | } | 45 | } |
46 | #else /* CONFIG_MMU */ | 46 | #endif |
47 | void *module_alloc(unsigned long size) | ||
48 | { | ||
49 | return size == 0 ? NULL : vmalloc(size); | ||
50 | } | ||
51 | #endif /* !CONFIG_MMU */ | ||
52 | |||
53 | void module_free(struct module *module, void *region) | ||
54 | { | ||
55 | vfree(region); | ||
56 | } | ||
57 | |||
58 | int module_frob_arch_sections(Elf_Ehdr *hdr, | ||
59 | Elf_Shdr *sechdrs, | ||
60 | char *secstrings, | ||
61 | struct module *mod) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | 47 | ||
66 | int | 48 | int |
67 | apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | 49 | apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, |
@@ -107,6 +89,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
107 | break; | 89 | break; |
108 | 90 | ||
109 | case R_ARM_ABS32: | 91 | case R_ARM_ABS32: |
92 | case R_ARM_TARGET1: | ||
110 | *(u32 *)loc += sym->st_value; | 93 | *(u32 *)loc += sym->st_value; |
111 | break; | 94 | break; |
112 | 95 | ||
@@ -265,15 +248,6 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
265 | return 0; | 248 | return 0; |
266 | } | 249 | } |
267 | 250 | ||
268 | int | ||
269 | apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | ||
270 | unsigned int symindex, unsigned int relsec, struct module *module) | ||
271 | { | ||
272 | printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", | ||
273 | module->name); | ||
274 | return -ENOEXEC; | ||
275 | } | ||
276 | |||
277 | struct mod_unwind_map { | 251 | struct mod_unwind_map { |
278 | const Elf_Shdr *unw_sec; | 252 | const Elf_Shdr *unw_sec; |
279 | const Elf_Shdr *txt_sec; | 253 | const Elf_Shdr *txt_sec; |
@@ -350,7 +324,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
350 | #endif | 324 | #endif |
351 | s = find_mod_section(hdr, sechdrs, ".alt.smp.init"); | 325 | s = find_mod_section(hdr, sechdrs, ".alt.smp.init"); |
352 | if (s && !is_smp()) | 326 | if (s && !is_smp()) |
327 | #ifdef CONFIG_SMP_ON_UP | ||
353 | fixup_smp((void *)s->sh_addr, s->sh_size); | 328 | fixup_smp((void *)s->sh_addr, s->sh_size); |
329 | #else | ||
330 | return -EINVAL; | ||
331 | #endif | ||
354 | return 0; | 332 | return 0; |
355 | } | 333 | } |
356 | 334 | ||