]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
dce97c8c PM |
2 | /* |
3 | * ld script to make SuperH Linux kernel | |
4 | * Written by Niibe Yutaka and Paul Mundt | |
5 | */ | |
dce97c8c | 6 | OUTPUT_ARCH(sh) |
dce97c8c PM |
7 | #include <asm/thread_info.h> |
8 | #include <asm/cache.h> | |
bd353861 | 9 | #include <asm/vmlinux.lds.h> |
dce97c8c | 10 | |
1d5cfcdf PM |
11 | #ifdef CONFIG_PMB |
12 | #define MEMORY_OFFSET 0 | |
04c86973 | 13 | #else |
1d5cfcdf | 14 | #define MEMORY_OFFSET __MEMORY_START |
04c86973 PM |
15 | #endif |
16 | ||
dce97c8c PM |
17 | ENTRY(_start) |
18 | SECTIONS | |
19 | { | |
e66ac3f2 | 20 | . = PAGE_OFFSET + MEMORY_OFFSET + PHYSICAL_OFFSET + CONFIG_ZERO_PAGE_OFFSET; |
dce97c8c | 21 | |
53c0054c MD |
22 | _text = .; /* Text and read-only data */ |
23 | ||
37744fee | 24 | .empty_zero_page : AT(ADDR(.empty_zero_page)) { |
dce97c8c PM |
25 | *(.empty_zero_page) |
26 | } = 0 | |
27 | ||
37744fee | 28 | .text : AT(ADDR(.text)) { |
dce97c8c PM |
29 | HEAD_TEXT |
30 | TEXT_TEXT | |
dce97c8c | 31 | SCHED_TEXT |
6727ad9e | 32 | CPUIDLE_TEXT |
dce97c8c PM |
33 | LOCK_TEXT |
34 | KPROBES_TEXT | |
35 | IRQENTRY_TEXT | |
be7635e7 | 36 | SOFTIRQENTRY_TEXT |
dce97c8c PM |
37 | *(.fixup) |
38 | *(.gnu.warning) | |
39 | _etext = .; /* End of text section */ | |
40 | } = 0x0009 | |
41 | ||
2802e345 | 42 | EXCEPTION_TABLE(16) |
660e2aca CS |
43 | |
44 | _sdata = .; | |
dce97c8c | 45 | RO_DATA(PAGE_SIZE) |
c9174047 | 46 | RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
660e2aca | 47 | _edata = .; |
dce97c8c | 48 | |
bd353861 MF |
49 | DWARF_EH_FRAME |
50 | ||
dce97c8c | 51 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
2802e345 TA |
52 | __init_begin = .; |
53 | INIT_TEXT_SECTION(PAGE_SIZE) | |
54 | INIT_DATA_SECTION(16) | |
dce97c8c PM |
55 | |
56 | . = ALIGN(4); | |
37744fee | 57 | .machvec.init : AT(ADDR(.machvec.init)) { |
dce97c8c PM |
58 | __machvec_start = .; |
59 | *(.machvec.init) | |
60 | __machvec_end = .; | |
61 | } | |
62 | ||
0415b00d | 63 | PERCPU_SECTION(L1_CACHE_BYTES) |
dce97c8c PM |
64 | |
65 | /* | |
66 | * .exit.text is discarded at runtime, not link time, to deal with | |
67 | * references from __bug_table | |
68 | */ | |
37744fee AB |
69 | .exit.text : AT(ADDR(.exit.text)) { EXIT_TEXT } |
70 | .exit.data : AT(ADDR(.exit.data)) { EXIT_DATA } | |
dce97c8c PM |
71 | |
72 | . = ALIGN(PAGE_SIZE); | |
2802e345 | 73 | __init_end = .; |
6bde607e | 74 | BSS_SECTION(0, PAGE_SIZE, 4) |
2802e345 | 75 | _end = . ; |
dce97c8c | 76 | |
dce97c8c PM |
77 | STABS_DEBUG |
78 | DWARF_DEBUG | |
023bf6f1 | 79 | |
023bf6f1 | 80 | DISCARDS |
dce97c8c | 81 | } |