RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / frv / kernel / module.c
blob06b410a5913795eb7ebdab61e5d60195424b16ff
1 /* module.c: FRV specific module loading bits
3 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 * - Derived from arch/i386/kernel/module.c, Copyright (C) 2001 Rusty Russell.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
12 #include <linux/moduleloader.h>
13 #include <linux/elf.h>
14 #include <linux/vmalloc.h>
15 #include <linux/fs.h>
16 #include <linux/string.h>
17 #include <linux/kernel.h>
19 #define DEBUGP(fmt...)
21 void *module_alloc(unsigned long size)
23 if (size == 0)
24 return NULL;
26 return vmalloc_exec(size);
30 /* Free memory returned from module_alloc */
31 void module_free(struct module *mod, void *module_region)
33 vfree(module_region);
36 /* We don't need anything special. */
37 int module_frob_arch_sections(Elf_Ehdr *hdr,
38 Elf_Shdr *sechdrs,
39 char *secstrings,
40 struct module *mod)
42 return 0;
45 int apply_relocate(Elf32_Shdr *sechdrs,
46 const char *strtab,
47 unsigned int symindex,
48 unsigned int relsec,
49 struct module *me)
51 printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name);
52 return -ENOEXEC;
55 int apply_relocate_add(Elf32_Shdr *sechdrs,
56 const char *strtab,
57 unsigned int symindex,
58 unsigned int relsec,
59 struct module *me)
61 printk(KERN_ERR "module %s: ADD RELOCATION unsupported\n", me->name);
62 return -ENOEXEC;
65 int module_finalize(const Elf_Ehdr *hdr,
66 const Elf_Shdr *sechdrs,
67 struct module *me)
69 return 0;
72 void module_arch_cleanup(struct module *mod)