blob: f1819423ffc9f7b006098729605506d85f617acb [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. */
Chris Metcalfacbde1d2013-09-03 14:41:36 -04008#define TEXT_OFFSET MEM_SV_START
Chris Metcalf867e3592010-05-28 23:09:12 -04009
10OUTPUT_ARCH(tile)
11ENTRY(_start)
12jiffies = jiffies_64;
13
14PHDRS
15{
Chris Metcalfacbde1d2013-09-03 14:41:36 -040016 intrpt PT_LOAD ;
Chris Metcalf867e3592010-05-28 23:09:12 -040017 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 */
Chris Metcalfacbde1d2013-09-03 14:41:36 -040027 .intrpt (LOAD_OFFSET) : AT ( 0 ) /* put at the start of physical memory */
Chris Metcalf867e3592010-05-28 23:09:12 -040028 {
29 _text = .;
Chris Metcalfacbde1d2013-09-03 14:41:36 -040030 *(.intrpt)
31 } :intrpt =0
Chris Metcalf867e3592010-05-28 23:09:12 -040032
33 /* Hypervisor call vectors */
Chris Metcalf9ae09832013-08-07 16:03:08 -040034 . = ALIGN(0x10000);
35 .hvglue : AT (ADDR(.hvglue) - LOAD_OFFSET) {
36 *(.hvglue)
37 } :NONE
Chris Metcalf867e3592010-05-28 23:09:12 -040038
39 /* Now the real code */
40 . = ALIGN(0x20000);
Jiang Liu40a3b8d2013-07-03 15:03:39 -070041 _stext = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040042 .text : AT (ADDR(.text) - LOAD_OFFSET) {
Chris Metcalf0707ad32010-06-25 17:04:17 -040043 HEAD_TEXT
Chris Metcalf867e3592010-05-28 23:09:12 -040044 SCHED_TEXT
45 LOCK_TEXT
Tony Lu3fa17c32013-08-09 15:08:57 -040046 KPROBES_TEXT
Tony Lua61fd5e2013-08-09 13:26:09 -040047 IRQENTRY_TEXT
Chris Metcalf867e3592010-05-28 23:09:12 -040048 __fix_text_end = .; /* tile-cpack won't rearrange before this */
Chris Metcalfe56059f2013-08-09 16:50:36 -040049 ALIGN_FUNCTION();
50 *(.hottext*)
Chris Metcalf867e3592010-05-28 23:09:12 -040051 TEXT_TEXT
52 *(.text.*)
53 *(.coldtext*)
54 *(.fixup)
55 *(.gnu.warning)
Chris Metcalf0707ad32010-06-25 17:04:17 -040056 } :text =0
Chris Metcalf867e3592010-05-28 23:09:12 -040057 _etext = .;
58
59 /* "Init" is divided into two areas with very different virtual addresses. */
60 INIT_TEXT_SECTION(PAGE_SIZE)
61
62 /* Now we skip back to PAGE_OFFSET for the data. */
63 . = (. - TEXT_OFFSET + PAGE_OFFSET);
64 #undef LOAD_OFFSET
65 #define LOAD_OFFSET PAGE_OFFSET
66
67 . = ALIGN(PAGE_SIZE);
Jiang Liu40a3b8d2013-07-03 15:03:39 -070068 __init_begin = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040069 VMLINUX_SYMBOL(_sinitdata) = .;
Chris Metcalf2cb82402011-02-27 18:52:24 -050070 INIT_DATA_SECTION(16) :data =0
Tejun Heo0415b00d12011-03-24 18:50:09 +010071 PERCPU_SECTION(L2_CACHE_BYTES)
Chris Metcalf867e3592010-05-28 23:09:12 -040072 . = ALIGN(PAGE_SIZE);
73 VMLINUX_SYMBOL(_einitdata) = .;
Jiang Liu40a3b8d2013-07-03 15:03:39 -070074 __init_end = .;
Chris Metcalf867e3592010-05-28 23:09:12 -040075
76 _sdata = .; /* Start of data section */
Chris Metcalf867e3592010-05-28 23:09:12 -040077 RO_DATA_SECTION(PAGE_SIZE)
Chris Metcalf867e3592010-05-28 23:09:12 -040078 RW_DATA_SECTION(L2_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
Chris Metcalf867e3592010-05-28 23:09:12 -040079 _edata = .;
80
81 EXCEPTION_TABLE(L2_CACHE_BYTES)
82 NOTES
83
84
85 BSS_SECTION(8, PAGE_SIZE, 1)
86 _end = . ;
87
88 STABS_DEBUG
89 DWARF_DEBUG
90
91 DISCARDS
92}