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>
14 #include <asm-generic/module.h>
19 * Thanks to Paul M for explaining this.
21 * PPC can only do rel jumps += 32MB, and often the kernel and other
22 * modules are furthur away than this. So, we jump to a table of
23 * trampolines attached to the module (the Procedure Linkage Table)
24 * whenever that happens.
27 struct ppc_plt_entry
{
28 /* 16 byte jump instruction sequence (4 instructions) */
31 #endif /* __powerpc64__ */
34 struct mod_arch_specific
{
36 unsigned int stubs_section
; /* Index of stubs section in module */
37 unsigned int toc_section
; /* What section is the TOC? */
38 bool toc_fixed
; /* Have we fixed up .TOC.? */
39 #ifdef CONFIG_DYNAMIC_FTRACE
45 /* Indices of PLT sections within module. */
46 unsigned int core_plt_section
;
47 unsigned int init_plt_section
;
48 #ifdef CONFIG_DYNAMIC_FTRACE
51 #endif /* powerpc64 */
53 /* List of BUG addresses, source line numbers and filenames */
54 struct list_head bug_list
;
55 struct bug_entry
*bug_table
;
56 unsigned int num_bugs
;
61 * Make empty section for module_frob_arch_sections to expand.
66 asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
70 asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
71 asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
75 #ifdef CONFIG_DYNAMIC_FTRACE
77 asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
81 bool is_module_trampoline(u32
*insns
);
82 int module_trampoline_target(struct module
*mod
, u32
*trampoline
,
83 unsigned long *target
);
85 struct exception_table_entry
;
86 void sort_ex_table(struct exception_table_entry
*start
,
87 struct exception_table_entry
*finish
);
89 #if defined(CONFIG_MODVERSIONS) && defined(CONFIG_PPC64)
90 #define ARCH_RELOCATES_KCRCTAB
91 #define reloc_start PHYSICAL_START
93 #endif /* __KERNEL__ */
94 #endif /* _ASM_POWERPC_MODULE_H */