1#ifndef _ASM_POWERPC_MODULE_H
2#define _ASM_POWERPC_MODULE_H
3#ifdef __KERNEL__
4
5
6
7
8
9
10
11
12#include <linux/list.h>
13#include <asm/bug.h>
14
15
16#ifndef __powerpc64__
17
18
19
20
21
22
23
24
25
26struct ppc_plt_entry {
27
28 unsigned int jump[4];
29};
30#endif
31
32
33struct mod_arch_specific {
34#ifdef __powerpc64__
35 unsigned int stubs_section;
36 unsigned int toc_section;
37#ifdef CONFIG_DYNAMIC_FTRACE
38 unsigned long toc;
39 unsigned long tramp;
40#endif
41
42#else
43
44 unsigned int core_plt_section;
45 unsigned int init_plt_section;
46#ifdef CONFIG_DYNAMIC_FTRACE
47 unsigned long tramp;
48#endif
49#endif
50
51
52 struct list_head bug_list;
53 struct bug_entry *bug_table;
54 unsigned int num_bugs;
55};
56
57
58
59
60
61
62#ifdef __powerpc64__
63# define Elf_Shdr Elf64_Shdr
64# define Elf_Sym Elf64_Sym
65# define Elf_Ehdr Elf64_Ehdr
66# ifdef MODULE
67 asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
68# endif
69#else
70# define Elf_Shdr Elf32_Shdr
71# define Elf_Sym Elf32_Sym
72# define Elf_Ehdr Elf32_Ehdr
73# ifdef MODULE
74 asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
75 asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
76# endif
77#endif
78
79#ifdef CONFIG_DYNAMIC_FTRACE
80# ifdef MODULE
81 asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
82# endif
83#endif
84
85
86struct exception_table_entry;
87void sort_ex_table(struct exception_table_entry *start,
88 struct exception_table_entry *finish);
89
90#ifdef CONFIG_MODVERSIONS
91#define ARCH_RELOCATES_KCRCTAB
92
93extern const unsigned long reloc_start[];
94#endif
95#endif
96#endif
97