| 1 | #ifndef _ASM_PPC_MODULE_H
|
| 2 | #define _ASM_PPC_MODULE_H
|
| 3 |
|
| 4 |
|
| 5 | #include <linux/list.h>
|
| 6 | #include <asm/bug.h>
|
| 7 |
|
| 8 | |
| 9 |
|
| 10 | PPC can only do rel jumps += 32MB, and often the kernel and other
|
| 11 | modules are furthur away than this. So, we jump to a table of
|
| 12 | trampolines attached to the module (the Procedure Linkage Table)
|
| 13 | whenever that happens.
|
| 14 |
|
| 15 |
|
| 16 | struct ppc_plt_entry
|
| 17 | {
|
| 18 |
|
| 19 | unsigned int jump[4];
|
| 20 | };
|
| 21 |
|
| 22 | struct mod_arch_specific
|
| 23 | {
|
| 24 |
|
| 25 | unsigned int core_plt_section, init_plt_section;
|
| 26 |
|
| 27 |
|
| 28 | struct list_head bug_list;
|
| 29 | struct bug_entry *bug_table;
|
| 30 | unsigned int num_bugs;
|
| 31 | };
|
| 32 |
|
| 33 | extern struct bug_entry *module_find_bug(unsigned long bugaddr);
|
| 34 |
|
| 35 | #define Elf_Shdr Elf32_Shdr
|
| 36 | #define Elf_Sym Elf32_Sym
|
| 37 | #define Elf_Ehdr Elf32_Ehdr
|
| 38 |
|
| 39 |
|
| 40 | #ifdef MODULE
|
| 41 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
|
| 42 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
|
| 43 | #endif
|
| 44 | #endif
|