diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-05-12 09:10:05 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-12 09:10:05 -0700 |
| commit | b7df5197b4b05adfa66563a5908d29ef74c0fc64 (patch) | |
| tree | 8084246585c916b9cbd9b005324b45ab63890c63 /kernel | |
| parent | f2248e8df63696954a4984fa5fa4d64a135f6de9 (diff) | |
[PATCH] implement module_arch_cleanup() in all architectures
From: Rusty Russell <rusty@rustcorp.com.au>, David Mosberger
The patch below updates the other platforms with module_arch_cleanup().
Also, I added more debug output to kernel/module.c since I found it useful
to be able to see the final section layout.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/module.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 06ff9328b30b..4a01db569ac8 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -910,6 +910,9 @@ static void free_module(struct module *mod) list_del(&mod->list); spin_unlock_irq(&modlist_lock); + /* Arch-specific cleanup. */ + module_arch_cleanup(mod); + /* Module unload stuff */ module_unload_free(mod); @@ -1276,6 +1279,7 @@ static struct module *load_module(void __user *umod, mod->module_init = ptr; /* Transfer each section which specifies SHF_ALLOC */ + DEBUGP("final section addresses:\n"); for (i = 0; i < hdr->e_shnum; i++) { void *dest; @@ -1293,6 +1297,7 @@ static struct module *load_module(void __user *umod, sechdrs[i].sh_size); /* Update sh_addr to point to copy in image. */ sechdrs[i].sh_addr = (unsigned long)dest; + DEBUGP("\t0x%lx %s\n", sechdrs[i].sh_addr, secstrings + sechdrs[i].sh_name); } /* Module has been moved. */ mod = (void *)sechdrs[modindex].sh_addr; |
