aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/vmlinux.lds.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
new file mode 100644
index 000000000000..99cef06a364a
--- /dev/null
+++ b/include/asm-generic/vmlinux.lds.h
@@ -0,0 +1,90 @@
1#ifndef LOAD_OFFSET
2#define LOAD_OFFSET 0
3#endif
4
5#ifndef VMLINUX_SYMBOL
6#define VMLINUX_SYMBOL(_sym_) _sym_
7#endif
8
9#define RODATA \
10 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
11 *(.rodata) *(.rodata.*) \
12 *(__vermagic) /* Kernel version magic */ \
13 } \
14 \
15 .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \
16 *(.rodata1) \
17 } \
18 \
19 /* PCI quirks */ \
20 .pci_fixup : AT(ADDR(.pci_fixup) - LOAD_OFFSET) { \
21 VMLINUX_SYMBOL(__start_pci_fixups_early) = .; \
22 *(.pci_fixup_early) \
23 VMLINUX_SYMBOL(__end_pci_fixups_early) = .; \
24 VMLINUX_SYMBOL(__start_pci_fixups_header) = .; \
25 *(.pci_fixup_header) \
26 VMLINUX_SYMBOL(__end_pci_fixups_header) = .; \
27 VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \
28 *(.pci_fixup_final) \
29 VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \
30 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
31 *(.pci_fixup_enable) \
32 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
33 } \
34 \
35 /* Kernel symbol table: Normal symbols */ \
36 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
37 VMLINUX_SYMBOL(__start___ksymtab) = .; \
38 *(__ksymtab) \
39 VMLINUX_SYMBOL(__stop___ksymtab) = .; \
40 } \
41 \
42 /* Kernel symbol table: GPL-only symbols */ \
43 __ksymtab_gpl : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) { \
44 VMLINUX_SYMBOL(__start___ksymtab_gpl) = .; \
45 *(__ksymtab_gpl) \
46 VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \
47 } \
48 \
49 /* Kernel symbol table: Normal symbols */ \
50 __kcrctab : AT(ADDR(__kcrctab) - LOAD_OFFSET) { \
51 VMLINUX_SYMBOL(__start___kcrctab) = .; \
52 *(__kcrctab) \
53 VMLINUX_SYMBOL(__stop___kcrctab) = .; \
54 } \
55 \
56 /* Kernel symbol table: GPL-only symbols */ \
57 __kcrctab_gpl : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) { \
58 VMLINUX_SYMBOL(__start___kcrctab_gpl) = .; \
59 *(__kcrctab_gpl) \
60 VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \
61 } \
62 \
63 /* Kernel symbol table: strings */ \
64 __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
65 *(__ksymtab_strings) \
66 } \
67 \
68 /* Built-in module parameters. */ \
69 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
70 VMLINUX_SYMBOL(__start___param) = .; \
71 *(__param) \
72 VMLINUX_SYMBOL(__stop___param) = .; \
73 }
74
75#define SECURITY_INIT \
76 .security_initcall.init : { \
77 VMLINUX_SYMBOL(__security_initcall_start) = .; \
78 *(.security_initcall.init) \
79 VMLINUX_SYMBOL(__security_initcall_end) = .; \
80 }
81
82#define SCHED_TEXT \
83 VMLINUX_SYMBOL(__sched_text_start) = .; \
84 *(.sched.text) \
85 VMLINUX_SYMBOL(__sched_text_end) = .;
86
87#define LOCK_TEXT \
88 VMLINUX_SYMBOL(__lock_text_start) = .; \
89 *(.spinlock.text) \
90 VMLINUX_SYMBOL(__lock_text_end) = .;