• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ASM_GENERIC_SECTIONS_H_
2 #define _ASM_GENERIC_SECTIONS_H_
3 
4 /* References to section boundaries */
5 
6 #include <linux/compiler.h>
7 
8 /*
9  * Usage guidelines:
10  * _text, _data: architecture specific, don't use them in arch-independent code
11  * [_stext, _etext]: contains .text.* sections, may also contain .rodata.*
12  *                   and/or .init.* sections
13  * [_sdata, _edata]: contains .data.* sections, may also contain .rodata.*
14  *                   and/or .init.* sections.
15  * [__start_rodata, __end_rodata]: contains .rodata.* sections
16  * [__init_begin, __init_end]: contains .init.* sections, but .init.text.*
17  *                   may be out of this range on some architectures.
18  * [_sinittext, _einittext]: contains .init.text.* sections
19  * [__bss_start, __bss_stop]: contains BSS sections
20  *
21  * Following global variables are optional and may be unavailable on some
22  * architectures and/or kernel configurations.
23  *	_text, _data
24  *	__kprobes_text_start, __kprobes_text_end
25  *	__entry_text_start, __entry_text_end
26  *	__ctors_start, __ctors_end
27  *	__irqentry_text_start, __irqentry_text_end
28  *	__softirqentry_text_start, __softirqentry_text_end
29  */
30 extern char _text[], _stext[], _etext[];
31 extern char _data[], _sdata[], _edata[];
32 extern char __bss_start[], __bss_stop[];
33 extern char __init_begin[], __init_end[];
34 extern char _sinittext[], _einittext[];
35 extern char _end[];
36 extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];
37 extern char __kprobes_text_start[], __kprobes_text_end[];
38 extern char __entry_text_start[], __entry_text_end[];
39 extern char __start_rodata[], __end_rodata[];
40 extern char __irqentry_text_start[], __irqentry_text_end[];
41 extern char __softirqentry_text_start[], __softirqentry_text_end[];
42 
43 /* Start and end of .ctors section - used for constructor calls. */
44 extern char __ctors_start[], __ctors_end[];
45 
46 extern __visible const void __nosave_begin, __nosave_end;
47 
48 /* function descriptor handling (if any).  Override
49  * in asm/sections.h */
50 #ifndef dereference_function_descriptor
51 #define dereference_function_descriptor(p) (p)
52 #endif
53 
54 /* random extra sections (if any).  Override
55  * in asm/sections.h */
56 #ifndef arch_is_kernel_text
arch_is_kernel_text(unsigned long addr)57 static inline int arch_is_kernel_text(unsigned long addr)
58 {
59 	return 0;
60 }
61 #endif
62 
63 #ifndef arch_is_kernel_data
arch_is_kernel_data(unsigned long addr)64 static inline int arch_is_kernel_data(unsigned long addr)
65 {
66 	return 0;
67 }
68 #endif
69 
70 #endif /* _ASM_GENERIC_SECTIONS_H_ */
71