diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc/module.h | 13 | ||||
| -rw-r--r-- | include/linux/moduleloader.h | 19 |
2 files changed, 12 insertions, 20 deletions
diff --git a/include/asm-ppc/module.h b/include/asm-ppc/module.h index 7d75a3e3e2ee..9686cfa4fc36 100644 --- a/include/asm-ppc/module.h +++ b/include/asm-ppc/module.h @@ -18,16 +18,17 @@ struct ppc_plt_entry struct mod_arch_specific { - /* How much of the core is actually taken up with core (then - we know the rest is for the PLT */ - unsigned int core_plt_offset; - - /* Same for init */ - unsigned int init_plt_offset; + /* Indices of PLT sections within module. */ + unsigned int core_plt_section, init_plt_section; }; #define Elf_Shdr Elf32_Shdr #define Elf_Sym Elf32_Sym #define Elf_Ehdr Elf32_Ehdr +/* Make empty sections for module_frob_arch_sections to expand. */ +#ifdef MODULE +asm(".section .plt,\"aws\",@nobits; .align 3; .previous"); +asm(".section .plt.init,\"aws\",@nobits; .align 3; .previous"); +#endif #endif /* _ASM_PPC_MODULE_H */ 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. */ |
