aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2011-06-30 15:22:12 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-07-24 08:36:04 -0400
commit66574cc05438dd0907029075d7e6ec5ac0036fbc (patch)
tree8516792e486a535840e09b67f0831c303df3d45d /arch/powerpc
parent74e08fcf7bef973512a1f813700f802a93678670 (diff)
modules: make arch's use default loader hooks
This patch removes all the module loader hook implementations in the architecture specific code where the functionality is the same as that now provided by the recently added default hooks. Signed-off-by: Jonas Bonn <jonas@southpole.se> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/module.c18
-rw-r--r--arch/powerpc/kernel/module_32.c11
-rw-r--r--arch/powerpc/kernel/module_64.c10
3 files changed, 0 insertions, 39 deletions
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
index 49cee9df225b..a1cd701b5753 100644
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@ -31,20 +31,6 @@
31 31
32LIST_HEAD(module_bug_list); 32LIST_HEAD(module_bug_list);
33 33
34void *module_alloc(unsigned long size)
35{
36 if (size == 0)
37 return NULL;
38
39 return vmalloc_exec(size);
40}
41
42/* Free memory returned from module_alloc */
43void module_free(struct module *mod, void *module_region)
44{
45 vfree(module_region);
46}
47
48static const Elf_Shdr *find_section(const Elf_Ehdr *hdr, 34static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
49 const Elf_Shdr *sechdrs, 35 const Elf_Shdr *sechdrs,
50 const char *name) 36 const char *name)
@@ -93,7 +79,3 @@ int module_finalize(const Elf_Ehdr *hdr,
93 79
94 return 0; 80 return 0;
95} 81}
96
97void module_arch_cleanup(struct module *mod)
98{
99}
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
index f832773fc28e..0b6d79617d7b 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -174,17 +174,6 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
174 return 0; 174 return 0;
175} 175}
176 176
177int apply_relocate(Elf32_Shdr *sechdrs,
178 const char *strtab,
179 unsigned int symindex,
180 unsigned int relsec,
181 struct module *module)
182{
183 printk(KERN_ERR "%s: Non-ADD RELOCATION unsupported\n",
184 module->name);
185 return -ENOEXEC;
186}
187
188static inline int entry_matches(struct ppc_plt_entry *entry, Elf32_Addr val) 177static inline int entry_matches(struct ppc_plt_entry *entry, Elf32_Addr val)
189{ 178{
190 if (entry->jump[0] == 0x3d600000 + ((val + 0x8000) >> 16) 179 if (entry->jump[0] == 0x3d600000 + ((val + 0x8000) >> 16)
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 8fbb12508bf3..9f44a775a106 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -243,16 +243,6 @@ int module_frob_arch_sections(Elf64_Ehdr *hdr,
243 return 0; 243 return 0;
244} 244}
245 245
246int apply_relocate(Elf64_Shdr *sechdrs,
247 const char *strtab,
248 unsigned int symindex,
249 unsigned int relsec,
250 struct module *me)
251{
252 printk(KERN_ERR "%s: Non-ADD RELOCATION unsupported\n", me->name);
253 return -ENOEXEC;
254}
255
256/* r2 is the TOC pointer: it actually points 0x8000 into the TOC (this 246/* r2 is the TOC pointer: it actually points 0x8000 into the TOC (this
257 gives the value maximum span in an instruction which uses a signed 247 gives the value maximum span in an instruction which uses a signed
258 offset) */ 248 offset) */