Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * vmlinux.lds.S -- master linker script for m68knommu arch | |
3 | * | |
73e2fba8 | 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> |
1da177e4 | 5 | * |
1c952af5 GU |
6 | * This linker script is equiped to build either ROM loaded or RAM |
7 | * run kernels. | |
1da177e4 LT |
8 | */ |
9 | ||
1da177e4 | 10 | #include <asm-generic/vmlinux.lds.h> |
f4bed4fb | 11 | #include <asm/page.h> |
49612a5f | 12 | #include <asm/thread_info.h> |
1da177e4 | 13 | |
1da177e4 | 14 | #if defined(CONFIG_RAMKERNEL) |
73e2fba8 GU |
15 | #define RAM_START CONFIG_KERNELBASE |
16 | #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) | |
1da177e4 LT |
17 | #define TEXT ram |
18 | #define DATA ram | |
19 | #define INIT ram | |
10f204e5 | 20 | #define BSSS ram |
1da177e4 LT |
21 | #endif |
22 | #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) | |
73e2fba8 GU |
23 | #define RAM_START CONFIG_RAMBASE |
24 | #define RAM_LENGTH CONFIG_RAMSIZE | |
1c952af5 GU |
25 | #define ROMVEC_START CONFIG_ROMVEC |
26 | #define ROMVEC_LENGTH CONFIG_ROMVECSIZE | |
27 | #define ROM_START CONFIG_ROMSTART | |
28 | #define ROM_LENGTH CONFIG_ROMSIZE | |
1da177e4 LT |
29 | #define TEXT rom |
30 | #define DATA ram | |
31 | #define INIT ram | |
10f204e5 | 32 | #define BSSS ram |
1da177e4 LT |
33 | #endif |
34 | ||
35 | #ifndef DATA_ADDR | |
36 | #define DATA_ADDR | |
37 | #endif | |
38 | ||
39 | ||
40 | OUTPUT_ARCH(m68k) | |
41 | ENTRY(_start) | |
42 | ||
43 | MEMORY { | |
1da177e4 | 44 | ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH |
1da177e4 LT |
45 | #ifdef ROM_START |
46 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH | |
47 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH | |
1da177e4 LT |
48 | #endif |
49 | } | |
50 | ||
51 | jiffies = jiffies_64 + 4; | |
52 | ||
53 | SECTIONS { | |
54 | ||
55 | #ifdef ROMVEC_START | |
56 | . = ROMVEC_START ; | |
57 | .romvec : { | |
58 | __rom_start = . ; | |
59 | _romvec = .; | |
60 | *(.data.initvect) | |
61 | } > romvec | |
62 | #endif | |
63 | ||
64 | .text : { | |
fd593d12 | 65 | _text = .; |
1da177e4 | 66 | _stext = . ; |
9b0e7410 | 67 | HEAD_TEXT |
7664709b | 68 | TEXT_TEXT |
1da177e4 | 69 | SCHED_TEXT |
779125c2 | 70 | LOCK_TEXT |
1da177e4 LT |
71 | *(.text.lock) |
72 | ||
73 | . = ALIGN(16); /* Exception table */ | |
74 | __start___ex_table = .; | |
75 | *(__ex_table) | |
76 | __stop___ex_table = .; | |
77 | ||
78 | *(.rodata) *(.rodata.*) | |
79 | *(__vermagic) /* Kernel version magic */ | |
779125c2 | 80 | *(__markers_strings) |
1da177e4 LT |
81 | *(.rodata1) |
82 | *(.rodata.str1.1) | |
83 | ||
84 | /* Kernel symbol table: Normal symbols */ | |
85 | . = ALIGN(4); | |
86 | __start___ksymtab = .; | |
87 | *(__ksymtab) | |
88 | __stop___ksymtab = .; | |
89 | ||
90 | /* Kernel symbol table: GPL-only symbols */ | |
91 | __start___ksymtab_gpl = .; | |
92 | *(__ksymtab_gpl) | |
93 | __stop___ksymtab_gpl = .; | |
94 | ||
56591b99 GU |
95 | /* Kernel symbol table: Normal unused symbols */ |
96 | __start___ksymtab_unused = .; | |
97 | *(__ksymtab_unused) | |
98 | __stop___ksymtab_unused = .; | |
99 | ||
100 | /* Kernel symbol table: GPL-only unused symbols */ | |
101 | __start___ksymtab_unused_gpl = .; | |
102 | *(__ksymtab_unused_gpl) | |
103 | __stop___ksymtab_unused_gpl = .; | |
104 | ||
9f28bb7e GKH |
105 | /* Kernel symbol table: GPL-future symbols */ |
106 | __start___ksymtab_gpl_future = .; | |
107 | *(__ksymtab_gpl_future) | |
108 | __stop___ksymtab_gpl_future = .; | |
109 | ||
1da177e4 LT |
110 | /* Kernel symbol table: Normal symbols */ |
111 | __start___kcrctab = .; | |
112 | *(__kcrctab) | |
113 | __stop___kcrctab = .; | |
114 | ||
115 | /* Kernel symbol table: GPL-only symbols */ | |
116 | __start___kcrctab_gpl = .; | |
117 | *(__kcrctab_gpl) | |
118 | __stop___kcrctab_gpl = .; | |
119 | ||
f38c8431 GU |
120 | /* Kernel symbol table: Normal unused symbols */ |
121 | __start___kcrctab_unused = .; | |
122 | *(__kcrctab_unused) | |
123 | __stop___kcrctab_unused = .; | |
124 | ||
125 | /* Kernel symbol table: GPL-only unused symbols */ | |
126 | __start___kcrctab_unused_gpl = .; | |
127 | *(__kcrctab_unused_gpl) | |
128 | __stop___kcrctab_unused_gpl = .; | |
129 | ||
9f28bb7e GKH |
130 | /* Kernel symbol table: GPL-future symbols */ |
131 | __start___kcrctab_gpl_future = .; | |
132 | *(__kcrctab_gpl_future) | |
133 | __stop___kcrctab_gpl_future = .; | |
134 | ||
1da177e4 LT |
135 | /* Kernel symbol table: strings */ |
136 | *(__ksymtab_strings) | |
137 | ||
138 | /* Built-in module parameters */ | |
124df2df | 139 | . = ALIGN(4) ; |
1da177e4 LT |
140 | __start___param = .; |
141 | *(__param) | |
142 | __stop___param = .; | |
143 | ||
144 | . = ALIGN(4) ; | |
145 | _etext = . ; | |
146 | } > TEXT | |
147 | ||
1da177e4 LT |
148 | .data DATA_ADDR : { |
149 | . = ALIGN(4); | |
150 | _sdata = . ; | |
ca967258 | 151 | DATA_DATA |
49612a5f TA |
152 | CACHELINE_ALIGNED_DATA(32) |
153 | INIT_TASK_DATA(THREAD_SIZE) | |
1da177e4 LT |
154 | _edata = . ; |
155 | } > DATA | |
156 | ||
157 | .init : { | |
f4bed4fb | 158 | . = ALIGN(PAGE_SIZE); |
1da177e4 | 159 | __init_begin = .; |
a90a44ee TA |
160 | } > INIT |
161 | .init : { | |
1da177e4 | 162 | _sinittext = .; |
01ba2bdc | 163 | INIT_TEXT |
1da177e4 | 164 | _einittext = .; |
01ba2bdc | 165 | INIT_DATA |
84bd7571 TA |
166 | INIT_SETUP(16) |
167 | INIT_CALLS | |
168 | CON_INITCALL | |
169 | SECURITY_INITCALL | |
170 | INIT_RAM_FS | |
995bcd3d TA |
171 | } > INIT |
172 | .init : { | |
f4bed4fb | 173 | . = ALIGN(PAGE_SIZE); |
1da177e4 LT |
174 | __init_end = .; |
175 | } > INIT | |
176 | ||
1da177e4 LT |
177 | .bss : { |
178 | . = ALIGN(4); | |
179 | _sbss = . ; | |
180 | *(.bss) | |
181 | *(COMMON) | |
182 | . = ALIGN(4) ; | |
183 | _ebss = . ; | |
779125c2 | 184 | _end = . ; |
10f204e5 | 185 | } > BSSS |
1da177e4 | 186 | |
023bf6f1 | 187 | DISCARDS |
1da177e4 LT |
188 | } |
189 |