summaryrefslogtreecommitdiff
path: root/include/asm-ppc/module.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-01-01 03:02:38 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-01 03:02:38 -0800
commit5b2f80762d125d8a3aa4710129eca6bbbcc4d1ad (patch)
tree75a18cd4d5141d0b39ae1df8d35f7352fd33b04f /include/asm-ppc/module.h
parent18f7a1aea0dff1bb189913d62a34329689c33a15 (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/asm-ppc/module.h')
-rw-r--r--include/asm-ppc/module.h13
1 files changed, 7 insertions, 6 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 */