1 #ifndef _ASM_POWERPC_MODULE_H
2 #define _ASM_POWERPC_MODULE_H
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <linux/list.h>
18 * Thanks to Paul M for explaining this.
20 * PPC can only do rel jumps += 32MB, and often the kernel and other
21 * modules are furthur away than this. So, we jump to a table of
22 * trampolines attached to the module (the Procedure Linkage Table)
23 * whenever that happens.
26 struct ppc_plt_entry
{
27 /* 16 byte jump instruction sequence (4 instructions) */
30 #endif /* __powerpc64__ */
33 struct mod_arch_specific
{
35 unsigned int stubs_section
; /* Index of stubs section in module */
36 unsigned int toc_section
; /* What section is the TOC? */
37 #ifdef CONFIG_DYNAMIC_FTRACE
43 /* Indices of PLT sections within module. */
44 unsigned int core_plt_section
;
45 unsigned int init_plt_section
;
46 #ifdef CONFIG_DYNAMIC_FTRACE
49 #endif /* powerpc64 */
51 /* List of BUG addresses, source line numbers and filenames */
52 struct list_head bug_list
;
53 struct bug_entry
*bug_table
;
54 unsigned int num_bugs
;
59 * Make empty section for module_frob_arch_sections to expand.
63 # define Elf_Shdr Elf64_Shdr
64 # define Elf_Sym Elf64_Sym
65 # define Elf_Ehdr Elf64_Ehdr
67 asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
70 # define Elf_Shdr Elf32_Shdr
71 # define Elf_Sym Elf32_Sym
72 # define Elf_Ehdr Elf32_Ehdr
74 asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
75 asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
79 #ifdef CONFIG_DYNAMIC_FTRACE
81 asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
86 struct exception_table_entry
;
87 void sort_ex_table(struct exception_table_entry
*start
,
88 struct exception_table_entry
*finish
);
90 #ifdef CONFIG_MODVERSIONS
91 #define ARCH_RELOCATES_KCRCTAB
93 extern const unsigned long reloc_start
[];
95 #endif /* __KERNEL__ */
96 #endif /* _ASM_POWERPC_MODULE_H */