]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
867e359b CM |
2 | #include <asm-generic/vmlinux.lds.h> |
3 | #include <asm/page.h> | |
4 | #include <asm/cache.h> | |
5 | #include <asm/thread_info.h> | |
6 | #include <hv/hypervisor.h> | |
7 | ||
8 | /* Text loads starting from the supervisor interrupt vector address. */ | |
acbde1db | 9 | #define TEXT_OFFSET MEM_SV_START |
867e359b CM |
10 | |
11 | OUTPUT_ARCH(tile) | |
12 | ENTRY(_start) | |
13 | jiffies = jiffies_64; | |
14 | ||
15 | PHDRS | |
16 | { | |
acbde1db | 17 | intrpt PT_LOAD ; |
867e359b CM |
18 | text PT_LOAD ; |
19 | data PT_LOAD ; | |
20 | } | |
21 | SECTIONS | |
22 | { | |
23 | /* Text is loaded with a different VA than data; start with text. */ | |
24 | #undef LOAD_OFFSET | |
25 | #define LOAD_OFFSET TEXT_OFFSET | |
26 | ||
27 | /* Interrupt vectors */ | |
acbde1db | 28 | .intrpt (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */ |
867e359b CM |
29 | { |
30 | _text = .; | |
acbde1db CM |
31 | *(.intrpt) |
32 | } :intrpt =0 | |
867e359b CM |
33 | |
34 | /* Hypervisor call vectors */ | |
9ae09838 CM |
35 | . = ALIGN(0x10000); |
36 | .hvglue : AT (ADDR(.hvglue) - LOAD_OFFSET) { | |
37 | *(.hvglue) | |
38 | } :NONE | |
867e359b CM |
39 | |
40 | /* Now the real code */ | |
41 | . = ALIGN(0x20000); | |
40a3b8df | 42 | _stext = .; |
867e359b | 43 | .text : AT (ADDR(.text) - LOAD_OFFSET) { |
0707ad30 | 44 | HEAD_TEXT |
867e359b | 45 | SCHED_TEXT |
6727ad9e | 46 | CPUIDLE_TEXT |
867e359b | 47 | LOCK_TEXT |
3fa17c39 | 48 | KPROBES_TEXT |
a61fd5e3 | 49 | IRQENTRY_TEXT |
be7635e7 | 50 | SOFTIRQENTRY_TEXT |
867e359b | 51 | __fix_text_end = .; /* tile-cpack won't rearrange before this */ |
e56059f2 CM |
52 | ALIGN_FUNCTION(); |
53 | *(.hottext*) | |
867e359b CM |
54 | TEXT_TEXT |
55 | *(.text.*) | |
56 | *(.coldtext*) | |
57 | *(.fixup) | |
58 | *(.gnu.warning) | |
0707ad30 | 59 | } :text =0 |
867e359b CM |
60 | _etext = .; |
61 | ||
62 | /* "Init" is divided into two areas with very different virtual addresses. */ | |
63 | INIT_TEXT_SECTION(PAGE_SIZE) | |
64 | ||
c14b4bcf CM |
65 | /* |
66 | * Some things, like the __jump_table, may contain symbol references | |
67 | * to __exit text, so include such text in the final image if so. | |
68 | * In that case we also override the _einittext from INIT_TEXT_SECTION. | |
69 | */ | |
70 | #ifdef CONFIG_JUMP_LABEL | |
71 | .exit.text : { | |
72 | EXIT_TEXT | |
73 | _einittext = .; | |
74 | } | |
75 | #endif | |
76 | ||
867e359b CM |
77 | /* Now we skip back to PAGE_OFFSET for the data. */ |
78 | . = (. - TEXT_OFFSET + PAGE_OFFSET); | |
79 | #undef LOAD_OFFSET | |
80 | #define LOAD_OFFSET PAGE_OFFSET | |
81 | ||
82 | . = ALIGN(PAGE_SIZE); | |
40a3b8df | 83 | __init_begin = .; |
2cb82400 | 84 | INIT_DATA_SECTION(16) :data =0 |
0415b00d | 85 | PERCPU_SECTION(L2_CACHE_BYTES) |
867e359b | 86 | . = ALIGN(PAGE_SIZE); |
40a3b8df | 87 | __init_end = .; |
867e359b CM |
88 | |
89 | _sdata = .; /* Start of data section */ | |
867e359b | 90 | RO_DATA_SECTION(PAGE_SIZE) |
867e359b | 91 | RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
867e359b CM |
92 | _edata = .; |
93 | ||
94 | EXCEPTION_TABLE(L2_CACHE_BYTES) | |
95 | NOTES | |
96 | ||
97 | ||
98 | BSS_SECTION(8, PAGE_SIZE, 1) | |
99 | _end = . ; | |
100 | ||
101 | STABS_DEBUG | |
102 | DWARF_DEBUG | |
103 | ||
104 | DISCARDS | |
105 | } |