diff options
Diffstat (limited to 'arch/m68k/kernel/vmlinux-nommu.lds')
-rw-r--r-- | arch/m68k/kernel/vmlinux-nommu.lds | 200 |
1 files changed, 49 insertions, 151 deletions
diff --git a/arch/m68k/kernel/vmlinux-nommu.lds b/arch/m68k/kernel/vmlinux-nommu.lds index 8e66ccb0935e..40e02d9c38b4 100644 --- a/arch/m68k/kernel/vmlinux-nommu.lds +++ b/arch/m68k/kernel/vmlinux-nommu.lds | |||
@@ -1,195 +1,93 @@ | |||
1 | /* | 1 | /* |
2 | * vmlinux.lds.S -- master linker script for m68knommu arch | 2 | * vmlinux.lds.S -- master linker script for m68knommu arch |
3 | * | 3 | * |
4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> | 4 | * (C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com> |
5 | * | 5 | * |
6 | * This linker script is equipped to build either ROM loaded or RAM | 6 | * This linker script is equipped to build either ROM loaded or RAM |
7 | * run kernels. | 7 | * run kernels. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <asm-generic/vmlinux.lds.h> | ||
11 | #include <asm/page.h> | ||
12 | #include <asm/thread_info.h> | ||
13 | |||
14 | #if defined(CONFIG_RAMKERNEL) | 10 | #if defined(CONFIG_RAMKERNEL) |
15 | #define RAM_START CONFIG_KERNELBASE | 11 | #define KTEXT_ADDR CONFIG_KERNELBASE |
16 | #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) | ||
17 | #define TEXT ram | ||
18 | #define DATA ram | ||
19 | #define INIT ram | ||
20 | #define BSSS ram | ||
21 | #endif | ||
22 | #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) | ||
23 | #define RAM_START CONFIG_RAMBASE | ||
24 | #define RAM_LENGTH CONFIG_RAMSIZE | ||
25 | #define ROMVEC_START CONFIG_ROMVEC | ||
26 | #define ROMVEC_LENGTH CONFIG_ROMVECSIZE | ||
27 | #define ROM_START CONFIG_ROMSTART | ||
28 | #define ROM_LENGTH CONFIG_ROMSIZE | ||
29 | #define TEXT rom | ||
30 | #define DATA ram | ||
31 | #define INIT ram | ||
32 | #define BSSS ram | ||
33 | #endif | 12 | #endif |
34 | 13 | #if defined(CONFIG_ROMKERNEL) | |
35 | #ifndef DATA_ADDR | 14 | #define KTEXT_ADDR CONFIG_ROMSTART |
36 | #define DATA_ADDR | 15 | #define KDATA_ADDR CONFIG_KERNELBASE |
16 | #define LOAD_OFFSET KDATA_ADDR + (ADDR(.text) + SIZEOF(.text)) | ||
37 | #endif | 17 | #endif |
38 | 18 | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/thread_info.h> | ||
21 | #include <asm-generic/vmlinux.lds.h> | ||
39 | 22 | ||
40 | OUTPUT_ARCH(m68k) | 23 | OUTPUT_ARCH(m68k) |
41 | ENTRY(_start) | 24 | ENTRY(_start) |
42 | 25 | ||
43 | MEMORY { | ||
44 | ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH | ||
45 | #ifdef ROM_START | ||
46 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH | ||
47 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH | ||
48 | #endif | ||
49 | } | ||
50 | |||
51 | jiffies = jiffies_64 + 4; | 26 | jiffies = jiffies_64 + 4; |
52 | 27 | ||
53 | SECTIONS { | 28 | SECTIONS { |
54 | 29 | ||
55 | #ifdef ROMVEC_START | 30 | #ifdef CONFIG_ROMVEC |
56 | . = ROMVEC_START ; | 31 | . = CONFIG_ROMVEC; |
57 | .romvec : { | 32 | .romvec : { |
58 | __rom_start = . ; | 33 | __rom_start = .; |
59 | _romvec = .; | 34 | _romvec = .; |
35 | *(.romvec) | ||
60 | *(.data..initvect) | 36 | *(.data..initvect) |
61 | } > romvec | 37 | } |
62 | #endif | 38 | #endif |
63 | 39 | ||
40 | . = KTEXT_ADDR; | ||
41 | |||
42 | _text = .; | ||
43 | _stext = .; | ||
64 | .text : { | 44 | .text : { |
65 | _text = .; | ||
66 | _stext = . ; | ||
67 | HEAD_TEXT | 45 | HEAD_TEXT |
68 | TEXT_TEXT | 46 | TEXT_TEXT |
69 | SCHED_TEXT | 47 | SCHED_TEXT |
70 | LOCK_TEXT | 48 | LOCK_TEXT |
71 | *(.text..lock) | ||
72 | *(.fixup) | 49 | *(.fixup) |
50 | . = ALIGN(16); | ||
51 | } | ||
52 | _etext = .; | ||
53 | |||
54 | #ifdef KDATA_ADDR | ||
55 | . = KDATA_ADDR; | ||
56 | #endif | ||
57 | |||
58 | _sdata = .; | ||
59 | RO_DATA_SECTION(PAGE_SIZE) | ||
60 | RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) | ||
61 | _edata = .; | ||
73 | 62 | ||
74 | . = ALIGN(16); /* Exception table */ | 63 | EXCEPTION_TABLE(16) |
75 | __start___ex_table = .; | 64 | NOTES |
76 | *(__ex_table) | ||
77 | __stop___ex_table = .; | ||
78 | |||
79 | *(.rodata) *(.rodata.*) | ||
80 | *(__vermagic) /* Kernel version magic */ | ||
81 | *(.rodata1) | ||
82 | *(.rodata.str1.1) | ||
83 | |||
84 | /* Kernel symbol table: Normal symbols */ | ||
85 | . = ALIGN(4); | ||
86 | __start___ksymtab = .; | ||
87 | *(SORT(___ksymtab+*)) | ||
88 | __stop___ksymtab = .; | ||
89 | |||
90 | /* Kernel symbol table: GPL-only symbols */ | ||
91 | __start___ksymtab_gpl = .; | ||
92 | *(SORT(___ksymtab_gpl+*)) | ||
93 | __stop___ksymtab_gpl = .; | ||
94 | |||
95 | /* Kernel symbol table: Normal unused symbols */ | ||
96 | __start___ksymtab_unused = .; | ||
97 | *(SORT(___ksymtab_unused+*)) | ||
98 | __stop___ksymtab_unused = .; | ||
99 | |||
100 | /* Kernel symbol table: GPL-only unused symbols */ | ||
101 | __start___ksymtab_unused_gpl = .; | ||
102 | *(SORT(___ksymtab_unused_gpl+*)) | ||
103 | __stop___ksymtab_unused_gpl = .; | ||
104 | |||
105 | /* Kernel symbol table: GPL-future symbols */ | ||
106 | __start___ksymtab_gpl_future = .; | ||
107 | *(SORT(___ksymtab_gpl_future+*)) | ||
108 | __stop___ksymtab_gpl_future = .; | ||
109 | |||
110 | /* Kernel symbol table: Normal symbols */ | ||
111 | __start___kcrctab = .; | ||
112 | *(SORT(___kcrctab+*)) | ||
113 | __stop___kcrctab = .; | ||
114 | |||
115 | /* Kernel symbol table: GPL-only symbols */ | ||
116 | __start___kcrctab_gpl = .; | ||
117 | *(SORT(___kcrctab_gpl+*)) | ||
118 | __stop___kcrctab_gpl = .; | ||
119 | |||
120 | /* Kernel symbol table: Normal unused symbols */ | ||
121 | __start___kcrctab_unused = .; | ||
122 | *(SORT(___kcrctab_unused+*)) | ||
123 | __stop___kcrctab_unused = .; | ||
124 | |||
125 | /* Kernel symbol table: GPL-only unused symbols */ | ||
126 | __start___kcrctab_unused_gpl = .; | ||
127 | *(SORT(___kcrctab_unused_gpl+*)) | ||
128 | __stop___kcrctab_unused_gpl = .; | ||
129 | |||
130 | /* Kernel symbol table: GPL-future symbols */ | ||
131 | __start___kcrctab_gpl_future = .; | ||
132 | *(SORT(___kcrctab_gpl_future+*)) | ||
133 | __stop___kcrctab_gpl_future = .; | ||
134 | |||
135 | /* Kernel symbol table: strings */ | ||
136 | *(__ksymtab_strings) | ||
137 | |||
138 | /* Built-in module parameters */ | ||
139 | . = ALIGN(4) ; | ||
140 | __start___param = .; | ||
141 | *(__param) | ||
142 | __stop___param = .; | ||
143 | |||
144 | /* Built-in module versions */ | ||
145 | . = ALIGN(4) ; | ||
146 | __start___modver = .; | ||
147 | *(__modver) | ||
148 | __stop___modver = .; | ||
149 | |||
150 | . = ALIGN(4) ; | ||
151 | _etext = . ; | ||
152 | } > TEXT | ||
153 | |||
154 | .data DATA_ADDR : { | ||
155 | . = ALIGN(4); | ||
156 | _sdata = . ; | ||
157 | DATA_DATA | ||
158 | CACHELINE_ALIGNED_DATA(32) | ||
159 | PAGE_ALIGNED_DATA(PAGE_SIZE) | ||
160 | *(.data..shared_aligned) | ||
161 | INIT_TASK_DATA(THREAD_SIZE) | ||
162 | _edata = . ; | ||
163 | } > DATA | ||
164 | 65 | ||
66 | . = ALIGN(PAGE_SIZE); | ||
67 | __init_begin = .; | ||
68 | INIT_TEXT_SECTION(PAGE_SIZE) | ||
69 | INIT_DATA_SECTION(16) | ||
70 | PERCPU_SECTION(16) | ||
165 | .m68k_fixup : { | 71 | .m68k_fixup : { |
166 | __start_fixup = .; | 72 | __start_fixup = .; |
167 | *(.m68k_fixup) | 73 | *(.m68k_fixup) |
168 | __stop_fixup = .; | 74 | __stop_fixup = .; |
169 | } > DATA | 75 | } |
170 | NOTES > DATA | ||
171 | |||
172 | .init.text : { | ||
173 | . = ALIGN(PAGE_SIZE); | ||
174 | __init_begin = .; | ||
175 | } > INIT | ||
176 | INIT_TEXT_SECTION(PAGE_SIZE) > INIT | ||
177 | INIT_DATA_SECTION(16) > INIT | ||
178 | .init.data : { | 76 | .init.data : { |
179 | . = ALIGN(PAGE_SIZE); | 77 | . = ALIGN(PAGE_SIZE); |
180 | __init_end = .; | 78 | __init_end = .; |
181 | } > INIT | 79 | } |
182 | 80 | ||
183 | .bss : { | 81 | _sbss = .; |
184 | . = ALIGN(4); | 82 | BSS_SECTION(0, 0, 0) |
185 | _sbss = . ; | 83 | _ebss = .; |
186 | *(.bss) | 84 | |
187 | *(COMMON) | 85 | _end = .; |
188 | . = ALIGN(4) ; | 86 | |
189 | _ebss = . ; | 87 | STABS_DEBUG |
190 | _end = . ; | 88 | .comment 0 : { *(.comment) } |
191 | } > BSSS | ||
192 | 89 | ||
90 | /* Sections to be discarded */ | ||
193 | DISCARDS | 91 | DISCARDS |
194 | } | 92 | } |
195 | 93 | ||