aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-01-06 17:40:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:11 -0500
commitf1883f86dea84fe47a71a39fc1afccc005915ed8 (patch)
tree357c50d2eb44e9e62c39c0c1025bae7b2b6eba67 /kernel/module.c
parenteaccbfa564e48c87626594511f42dc8c0ad2daae (diff)
Remove remaining unwinder code
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Gabor Gombas <gombasg@sztaki.hu> Cc: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@elte.hu>, Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/kernel/module.c b/kernel/module.c
index f47cce910f25..34b56cf06615 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -43,7 +43,6 @@
43#include <linux/device.h> 43#include <linux/device.h>
44#include <linux/string.h> 44#include <linux/string.h>
45#include <linux/mutex.h> 45#include <linux/mutex.h>
46#include <linux/unwind.h>
47#include <linux/rculist.h> 46#include <linux/rculist.h>
48#include <asm/uaccess.h> 47#include <asm/uaccess.h>
49#include <asm/cacheflush.h> 48#include <asm/cacheflush.h>
@@ -1449,8 +1448,6 @@ static void free_module(struct module *mod)
1449 remove_sect_attrs(mod); 1448 remove_sect_attrs(mod);
1450 mod_kobject_remove(mod); 1449 mod_kobject_remove(mod);
1451 1450
1452 unwind_remove_table(mod->unwind_info, 0);
1453
1454 /* Arch-specific cleanup. */ 1451 /* Arch-specific cleanup. */
1455 module_arch_cleanup(mod); 1452 module_arch_cleanup(mod);
1456 1453
@@ -1867,7 +1864,6 @@ static noinline struct module *load_module(void __user *umod,
1867 unsigned int symindex = 0; 1864 unsigned int symindex = 0;
1868 unsigned int strindex = 0; 1865 unsigned int strindex = 0;
1869 unsigned int modindex, versindex, infoindex, pcpuindex; 1866 unsigned int modindex, versindex, infoindex, pcpuindex;
1870 unsigned int unwindex = 0;
1871 unsigned int num_kp, num_mcount; 1867 unsigned int num_kp, num_mcount;
1872 struct kernel_param *kp; 1868 struct kernel_param *kp;
1873 struct module *mod; 1869 struct module *mod;
@@ -1957,9 +1953,6 @@ static noinline struct module *load_module(void __user *umod,
1957 versindex = find_sec(hdr, sechdrs, secstrings, "__versions"); 1953 versindex = find_sec(hdr, sechdrs, secstrings, "__versions");
1958 infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo"); 1954 infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo");
1959 pcpuindex = find_pcpusec(hdr, sechdrs, secstrings); 1955 pcpuindex = find_pcpusec(hdr, sechdrs, secstrings);
1960#ifdef ARCH_UNWIND_SECTION_NAME
1961 unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME);
1962#endif
1963 1956
1964 /* Don't keep modinfo and version sections. */ 1957 /* Don't keep modinfo and version sections. */
1965 sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC; 1958 sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
@@ -1969,8 +1962,6 @@ static noinline struct module *load_module(void __user *umod,
1969 sechdrs[symindex].sh_flags |= SHF_ALLOC; 1962 sechdrs[symindex].sh_flags |= SHF_ALLOC;
1970 sechdrs[strindex].sh_flags |= SHF_ALLOC; 1963 sechdrs[strindex].sh_flags |= SHF_ALLOC;
1971#endif 1964#endif
1972 if (unwindex)
1973 sechdrs[unwindex].sh_flags |= SHF_ALLOC;
1974 1965
1975 /* Check module struct version now, before we try to use module. */ 1966 /* Check module struct version now, before we try to use module. */
1976 if (!check_modstruct_version(sechdrs, versindex, mod)) { 1967 if (!check_modstruct_version(sechdrs, versindex, mod)) {
@@ -2267,11 +2258,6 @@ static noinline struct module *load_module(void __user *umod,
2267 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2258 add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2268 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); 2259 add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
2269 2260
2270 /* Size of section 0 is 0, so this works well if no unwind info. */
2271 mod->unwind_info = unwind_add_table(mod,
2272 (void *)sechdrs[unwindex].sh_addr,
2273 sechdrs[unwindex].sh_size);
2274
2275 /* Get rid of temporary copy */ 2261 /* Get rid of temporary copy */
2276 vfree(hdr); 2262 vfree(hdr);
2277 2263
@@ -2370,7 +2356,6 @@ sys_init_module(void __user *umod,
2370 mutex_lock(&module_mutex); 2356 mutex_lock(&module_mutex);
2371 /* Drop initial reference. */ 2357 /* Drop initial reference. */
2372 module_put(mod); 2358 module_put(mod);
2373 unwind_remove_table(mod->unwind_info, 1);
2374 module_free(mod, mod->module_init); 2359 module_free(mod, mod->module_init);
2375 mod->module_init = NULL; 2360 mod->module_init = NULL;
2376 mod->init_size = 0; 2361 mod->init_size = 0;