blob: a13ed902afbbd645c521a7751f5930d76b5c8704 [file] [log] [blame]
Chris Metcalf867e3592010-05-28 23:09:12 -04001#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
10OUTPUT_ARCH(tile)
11ENTRY(_start)
12jiffies = jiffies_64;
13
14PHDRS
15{
16 intrpt1 PT_LOAD ;
17 text PT_LOAD ;
18 data PT_LOAD ;
19}
20SECTIONS
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 = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040030 *(.intrpt1)
31 } :intrpt1 =0
32
33 /* Hypervisor call vectors */
34 #include "hvglue.lds"
35
36 /* Now the real code */
37 . = ALIGN(0x20000);
Jiang Liu40a3b8d2013-07-03 15:03:39 -070038 _stext = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040039 .text : AT (ADDR(.text) - LOAD_OFFSET) {
Chris Metcalf0707ad32010-06-25 17:04:17 -040040 HEAD_TEXT
Chris Metcalf867e3592010-05-28 23:09:12 -040041 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)
Chris Metcalf0707ad32010-06-25 17:04:17 -040049 } :text =0
Chris Metcalf867e3592010-05-28 23:09:12 -040050 _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);
Jiang Liu40a3b8d2013-07-03 15:03:39 -070061 __init_begin = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040062 VMLINUX_SYMBOL(_sinitdata) = .;
Chris Metcalf2cb82402011-02-27 18:52:24 -050063 INIT_DATA_SECTION(16) :data =0
Tejun Heo0415b00d12011-03-24 18:50:09 +010064 PERCPU_SECTION(L2_CACHE_BYTES)
Chris Metcalf867e3592010-05-28 23:09:12 -040065 . = ALIGN(PAGE_SIZE);
66 VMLINUX_SYMBOL(_einitdata) = .;
Jiang Liu40a3b8d2013-07-03 15:03:39 -070067 __init_end = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040068
69 _sdata = .; /* Start of data section */
70
71 RO_DATA_SECTION(PAGE_SIZE)
72
73 /* initially writeable, then read-only */
74 . = ALIGN(PAGE_SIZE);
75 __w1data_begin = .;
76 .w1data : AT(ADDR(.w1data) - LOAD_OFFSET) {
77 VMLINUX_SYMBOL(__w1data_begin) = .;
78 *(.w1data)
79 VMLINUX_SYMBOL(__w1data_end) = .;
80 }
81
82 RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
83
84 _edata = .;
85
86 EXCEPTION_TABLE(L2_CACHE_BYTES)
87 NOTES
88
89
90 BSS_SECTION(8, PAGE_SIZE, 1)
91 _end = . ;
92
93 STABS_DEBUG
94 DWARF_DEBUG
95
96 DISCARDS
97}