diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-01-01 03:02:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-01 03:02:38 -0800 |
| commit | 5b2f80762d125d8a3aa4710129eca6bbbcc4d1ad (patch) | |
| tree | 75a18cd4d5141d0b39ae1df8d35f7352fd33b04f /include/linux | |
| parent | 18f7a1aea0dff1bb189913d62a34329689c33a15 (diff) | |
[PATCH] Modules 3/3: Sort sections
RTH's final complaint (so far 8) was that we should sort the module
sections: archs might require some sections to be adjacent, so they can
all be reached by a relative pointer (ie. GOT pointer). This
implements that reordering, and simplfies the module interface for
architectures as well.
Previously an arch could specify it wanted extra space, but not where
that space would be. The new method (used only by PPC so far) is to
allocate an empty section (in asm/module.h or by setting LDFLAGS_MODULE
to use an arch specific linker script), and expand that to the desired
size in "module_frob_arch_sections()".
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/moduleloader.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/include/linux/moduleloader.h b/include/linux/moduleloader.h index 928ae553ca37..5001ff39204d 100644 --- a/include/linux/moduleloader.h +++ b/include/linux/moduleloader.h @@ -15,20 +15,11 @@ unsigned long find_symbol_internal(Elf_Shdr *sechdrs, /* These must be implemented by the specific architecture */ -/* Total size to allocate for the non-releasable code; return len or - -error. mod->core_size is the current generic tally. */ -long module_core_size(const Elf_Ehdr *hdr, - const Elf_Shdr *sechdrs, - const char *secstrings, - struct module *mod); - -/* Total size of (if any) sections to be freed after init. Return 0 - for none, len, or -error. mod->init_size is the current generic - tally. */ -long module_init_size(const Elf_Ehdr *hdr, - const Elf_Shdr *sechdrs, - const char *secstrings, - struct module *mod); +/* Adjust arch-specific sections. Return 0 on success. */ +int module_frob_arch_sections(const Elf_Ehdr *hdr, + const Elf_Shdr *sechdrs, + const char *secstrings, + struct module *mod); /* Allocator used for allocating struct module, core sections and init sections. Returns NULL on failure. */ |
