Linux v2.6.13-rc3
[pohmelfs.git] / include / asm-ppc / module.h
blobfb63492562b0a3adf103dcc98e17d58e5969acd6
1 #ifndef _ASM_PPC_MODULE_H
2 #define _ASM_PPC_MODULE_H
3 /* Module stuff for PPC. (C) 2001 Rusty Russell */
5 #include <linux/list.h>
6 #include <asm/bug.h>
8 /* Thanks to Paul M for explaining this.
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.
16 struct ppc_plt_entry
18 /* 16 byte jump instruction sequence (4 instructions) */
19 unsigned int jump[4];
22 struct mod_arch_specific
24 /* Indices of PLT sections within module. */
25 unsigned int core_plt_section, init_plt_section;
27 /* List of BUG addresses, source line numbers and filenames */
28 struct list_head bug_list;
29 struct bug_entry *bug_table;
30 unsigned int num_bugs;
33 extern struct bug_entry *module_find_bug(unsigned long bugaddr);
35 #define Elf_Shdr Elf32_Shdr
36 #define Elf_Sym Elf32_Sym
37 #define Elf_Ehdr Elf32_Ehdr
39 /* Make empty sections for module_frob_arch_sections to expand. */
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 /* _ASM_PPC_MODULE_H */