diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2002-11-21 07:38:28 +1100 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2002-11-21 07:38:28 +1100 |
| commit | 9baa4bb9c7b946a219cbc8e704a39f6abefa0493 (patch) | |
| tree | 2839dd2b67f2ab7767ce269851e954f785177f5c /include | |
| parent | fdea9fc98bc266f5992b35c01737e5e6f70ffdd1 (diff) | |
PPC32: In-kernel module linker for PPC.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc/module.h | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/include/asm-ppc/module.h b/include/asm-ppc/module.h index 43ddf7c6aaab..7d75a3e3e2ee 100644 --- a/include/asm-ppc/module.h +++ b/include/asm-ppc/module.h @@ -1,12 +1,33 @@ #ifndef _ASM_PPC_MODULE_H #define _ASM_PPC_MODULE_H -/* - * This file contains the PPC architecture specific module code. - */ - -#define module_map(x) vmalloc(x) -#define module_unmap(x) vfree(x) -#define module_arch_init(x) (0) -#define arch_init_modules(x) do { } while (0) +/* Module stuff for PPC. (C) 2001 Rusty Russell */ + +/* Thanks to Paul M for explaining this. + + PPC can only do rel jumps += 32MB, and often the kernel and other + modules are furthur away than this. So, we jump to a table of + trampolines attached to the module (the Procedure Linkage Table) + whenever that happens. +*/ + +struct ppc_plt_entry +{ + /* 16 byte jump instruction sequence (4 instructions) */ + unsigned int jump[4]; +}; + +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; +}; + +#define Elf_Shdr Elf32_Shdr +#define Elf_Sym Elf32_Sym +#define Elf_Ehdr Elf32_Ehdr #endif /* _ASM_PPC_MODULE_H */ |
