diff options
Diffstat (limited to 'arch/tile/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/tile/kernel/vmlinux.lds.S | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/arch/tile/kernel/vmlinux.lds.S b/arch/tile/kernel/vmlinux.lds.S new file mode 100644 index 00000000000..25fdc0c1839 --- /dev/null +++ b/arch/tile/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,98 @@ | |||
1 | #include <asm-generic/vmlinux.lds.h> | ||
2 | #include <asm/page.h> | ||
3 | #include <asm/cache.h> | ||
4 | #include <asm/thread_info.h> | ||
5 | #include <hv/hypervisor.h> | ||
6 | |||
7 | /* Text loads starting from the supervisor interrupt vector address. */ | ||
8 | #define TEXT_OFFSET MEM_SV_INTRPT | ||
9 | |||
10 | OUTPUT_ARCH(tile) | ||
11 | ENTRY(_start) | ||
12 | jiffies = jiffies_64; | ||
13 | |||
14 | PHDRS | ||
15 | { | ||
16 | intrpt1 PT_LOAD ; | ||
17 | text PT_LOAD ; | ||
18 | data PT_LOAD ; | ||
19 | } | ||
20 | SECTIONS | ||
21 | { | ||
22 | /* Text is loaded with a different VA than data; start with text. */ | ||
23 | #undef LOAD_OFFSET | ||
24 | #define LOAD_OFFSET TEXT_OFFSET | ||
25 | |||
26 | /* Interrupt vectors */ | ||
27 | .intrpt1 (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */ | ||
28 | { | ||
29 | _text = .; | ||
30 | _stext = .; | ||
31 | *(.intrpt1) | ||
32 | } :intrpt1 =0 | ||
33 | |||
34 | /* Hypervisor call vectors */ | ||
35 | #include "hvglue.lds" | ||
36 | |||
37 | /* Now the real code */ | ||
38 | . = ALIGN(0x20000); | ||
39 | .text : AT (ADDR(.text) - LOAD_OFFSET) { | ||
40 | HEAD_TEXT | ||
41 | SCHED_TEXT | ||
42 | LOCK_TEXT | ||
43 | __fix_text_end = .; /* tile-cpack won't rearrange before this */ | ||
44 | TEXT_TEXT | ||
45 | *(.text.*) | ||
46 | *(.coldtext*) | ||
47 | *(.fixup) | ||
48 | *(.gnu.warning) | ||
49 | } :text =0 | ||
50 | _etext = .; | ||
51 | |||
52 | /* "Init" is divided into two areas with very different virtual addresses. */ | ||
53 | INIT_TEXT_SECTION(PAGE_SIZE) | ||
54 | |||
55 | /* Now we skip back to PAGE_OFFSET for the data. */ | ||
56 | . = (. - TEXT_OFFSET + PAGE_OFFSET); | ||
57 | #undef LOAD_OFFSET | ||
58 | #define LOAD_OFFSET PAGE_OFFSET | ||
59 | |||
60 | . = ALIGN(PAGE_SIZE); | ||
61 | VMLINUX_SYMBOL(_sinitdata) = .; | ||
62 | .init.page : AT (ADDR(.init.page) - LOAD_OFFSET) { | ||
63 | *(.init.page) | ||
64 | } :data =0 | ||
65 | INIT_DATA_SECTION(16) | ||
66 | PERCPU(PAGE_SIZE) | ||
67 | . = ALIGN(PAGE_SIZE); | ||
68 | VMLINUX_SYMBOL(_einitdata) = .; | ||
69 | |||
70 | _sdata = .; /* Start of data section */ | ||
71 | |||
72 | RO_DATA_SECTION(PAGE_SIZE) | ||
73 | |||
74 | /* initially writeable, then read-only */ | ||
75 | . = ALIGN(PAGE_SIZE); | ||
76 | __w1data_begin = .; | ||
77 | .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) { | ||
78 | VMLINUX_SYMBOL(__w1data_begin) = .; | ||
79 | *(.w1data) | ||
80 | VMLINUX_SYMBOL(__w1data_end) = .; | ||
81 | } | ||
82 | |||
83 | RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) | ||
84 | |||
85 | _edata = .; | ||
86 | |||
87 | EXCEPTION_TABLE(L2_CACHE_BYTES) | ||
88 | NOTES | ||
89 | |||
90 | |||
91 | BSS_SECTION(8, PAGE_SIZE, 1) | ||
92 | _end = . ; | ||
93 | |||
94 | STABS_DEBUG | ||
95 | DWARF_DEBUG | ||
96 | |||
97 | DISCARDS | ||
98 | } | ||