1 #ifndef _ASM_POWERPC_MODULE_H
2 #define _ASM_POWERPC_MODULE_H
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
11 #include <linux/list.h>
17 * Thanks to Paul M for explaining this.
19 * PPC can only do rel jumps += 32MB, and often the kernel and other
20 * modules are furthur away than this. So, we jump to a table of
21 * trampolines attached to the module (the Procedure Linkage Table)
22 * whenever that happens.
25 struct ppc_plt_entry
{
26 /* 16 byte jump instruction sequence (4 instructions) */
29 #endif /* __powerpc64__ */
32 struct mod_arch_specific
{
34 unsigned int stubs_section
; /* Index of stubs section in module */
35 unsigned int toc_section
; /* What section is the TOC? */
37 /* Indices of PLT sections within module. */
38 unsigned int core_plt_section
;
39 unsigned int init_plt_section
;
42 /* List of BUG addresses, source line numbers and filenames */
43 struct list_head bug_list
;
44 struct bug_entry
*bug_table
;
45 unsigned int num_bugs
;
48 extern struct bug_entry
*module_find_bug(unsigned long bugaddr
);
52 * Make empty section for module_frob_arch_sections to expand.
56 # define Elf_Shdr Elf64_Shdr
57 # define Elf_Sym Elf64_Sym
58 # define Elf_Ehdr Elf64_Ehdr
60 asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
63 # define Elf_Shdr Elf32_Shdr
64 # define Elf_Sym Elf32_Sym
65 # define Elf_Ehdr Elf32_Ehdr
67 asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
68 asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
73 struct exception_table_entry
;
74 void sort_ex_table(struct exception_table_entry
*start
,
75 struct exception_table_entry
*finish
);
77 #endif /* _ASM_POWERPC_MODULE_H */