1#include <linux/config.h>
2
3#include <asm/cache.h>
4#include <asm/page.h>
5#include <asm/system.h>
6
7OUTPUT_FORMAT("elf64-ia64-little")
8OUTPUT_ARCH(ia64)
9ENTRY(phys_start)
10PHDRS {
11  code   PT_LOAD;
12  data   PT_LOAD;
13}
14SECTIONS
15{
16  /* Sections to be discarded */
17  /DISCARD/ : {
18	*(.text.exit)
19	*(.data.exit)
20	*(*.text.exit)
21	*(*.data.exit)
22	*(.exitcall.exit)
23	*(.IA_64.unwind.text.exit)
24	*(.IA_64.unwind_info.text.exit)
25	}
26
27  v = PAGE_OFFSET;	/* this symbol is here to make debugging easier... */
28  phys_start = _start - PAGE_OFFSET;
29
30  code : { } :code
31  . = KERNEL_START;
32
33  _text = .;
34  _stext = .;
35
36  .text : AT(ADDR(.text) - PAGE_OFFSET)
37    {
38	*(.text.ivt)
39	*(.text)
40    }
41  .text2 : AT(ADDR(.text2) - PAGE_OFFSET)
42	{ *(.text2) }
43#ifdef CONFIG_SMP
44  .text.lock : AT(ADDR(.text.lock) - PAGE_OFFSET)
45	{ *(.text.lock) }
46#endif
47  _etext = .;
48
49  /* Read-only data */
50
51  /* Global data */
52  _data = .;
53
54  /* Exception table */
55  . = ALIGN(16);
56  __ex_table : AT(ADDR(__ex_table) - PAGE_OFFSET)
57	{
58	  __start___ex_table = .;
59	  *(__ex_table)
60	  __stop___ex_table = .;
61	}
62
63#if defined(CONFIG_IA64_GENERIC)
64  /* Machine Vector */
65  . = ALIGN(16);
66  .machvec : AT(ADDR(.machvec) - PAGE_OFFSET)
67	{
68	  machvec_start = .;
69	  *(.machvec)
70	  machvec_end = .;
71	}
72#endif
73
74  __ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET)
75	{
76	  __start___ksymtab = .;	/* Kernel symbol table */
77	  *(__ksymtab)
78	  __stop___ksymtab = .;
79	}
80
81  __kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
82	{
83	  __start___kallsyms = .;	/* All kernel symbols for debugging */
84	  *(__kallsyms)
85	  __stop___kallsyms = .;
86	}
87
88  /* Unwind info & table: */
89  . = ALIGN(8);
90  .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
91	{ *(.IA_64.unwind_info*) }
92  .IA_64.unwind : AT(ADDR(.IA_64.unwind) - PAGE_OFFSET)
93	{
94	  ia64_unw_start = .;
95	  *(.IA_64.unwind*)
96	  ia64_unw_end = .;
97	}
98
99  .rodata : AT(ADDR(.rodata) - PAGE_OFFSET)
100	{ *(.rodata) *(.rodata.*) }
101  .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
102	{ *(.kstrtab) }
103  .opd : AT(ADDR(.opd) - PAGE_OFFSET)
104	{ *(.opd) }
105
106  /* Initialization code and data: */
107
108  . = ALIGN(PAGE_SIZE);
109  __init_begin = .;
110  .text.init : AT(ADDR(.text.init) - PAGE_OFFSET)
111	{ *(.text.init) }
112
113  .data.init : AT(ADDR(.data.init) - PAGE_OFFSET)
114	{ *(.data.init) }
115   . = ALIGN(16);
116  .setup.init : AT(ADDR(.setup.init) - PAGE_OFFSET)
117        {
118	  __setup_start = .;
119	  *(.setup.init)
120	  __setup_end = .;
121	}
122  .initcall.init : AT(ADDR(.initcall.init) - PAGE_OFFSET)
123        {
124	  __initcall_start = .;
125	  *(.initcall.init)
126	  __initcall_end = .;
127	}
128  . = ALIGN(PAGE_SIZE);
129  __init_end = .;
130
131  /* The initial task and kernel stack */
132  init_task : AT(ADDR(init_task) - PAGE_OFFSET)
133	{ *(init_task) }
134
135  .data.page_aligned : AT(ADDR(.data.page_aligned) - PAGE_OFFSET)
136        { *(__special_page_section)
137	  __start_gate_section = .;
138	  *(.text.gate)
139	  __stop_gate_section = .;
140	}
141
142  . = ALIGN(SMP_CACHE_BYTES);
143  .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - PAGE_OFFSET)
144        { *(.data.cacheline_aligned) }
145
146  /* Kernel symbol names for modules: */
147  .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
148	{ *(.kstrtab) }
149
150  data : { } :data
151  .data : AT(ADDR(.data) - PAGE_OFFSET)
152	{ *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS }
153
154
155  . = ALIGN(16);
156  __gp = . + 0x200000;	/* gp must be 16-byte aligned for exc. table */
157
158  .got : AT(ADDR(.got) - PAGE_OFFSET)
159	{ *(.got.plt) *(.got) }
160  /* We want the small data sections together, so single-instruction offsets
161     can access them all, and initialized data all before uninitialized, so
162     we can shorten the on-disk segment size.  */
163  .sdata : AT(ADDR(.sdata) - PAGE_OFFSET)
164	{ *(.sdata) }
165  _edata  =  .;
166  _bss = .;
167  .sbss : AT(ADDR(.sbss) - PAGE_OFFSET)
168	{ *(.sbss) *(.scommon) }
169  .bss : AT(ADDR(.bss) - PAGE_OFFSET)
170	{ *(.bss) *(COMMON) }
171  . = ALIGN(64 / 8);
172  _end = .;
173
174  code : { } :code
175  /* Stabs debugging sections.  */
176  .stab 0 : { *(.stab) }
177  .stabstr 0 : { *(.stabstr) }
178  .stab.excl 0 : { *(.stab.excl) }
179  .stab.exclstr 0 : { *(.stab.exclstr) }
180  .stab.index 0 : { *(.stab.index) }
181  .stab.indexstr 0 : { *(.stab.indexstr) }
182  /* DWARF debug sections.
183     Symbols in the DWARF debugging sections are relative to the beginning
184     of the section so we begin them at 0.  */
185  /* DWARF 1 */
186  .debug          0 : { *(.debug) }
187  .line           0 : { *(.line) }
188  /* GNU DWARF 1 extensions */
189  .debug_srcinfo  0 : { *(.debug_srcinfo) }
190  .debug_sfnames  0 : { *(.debug_sfnames) }
191  /* DWARF 1.1 and DWARF 2 */
192  .debug_aranges  0 : { *(.debug_aranges) }
193  .debug_pubnames 0 : { *(.debug_pubnames) }
194  /* DWARF 2 */
195  .debug_info     0 : { *(.debug_info) }
196  .debug_abbrev   0 : { *(.debug_abbrev) }
197  .debug_line     0 : { *(.debug_line) }
198  .debug_frame    0 : { *(.debug_frame) }
199  .debug_str      0 : { *(.debug_str) }
200  .debug_loc      0 : { *(.debug_loc) }
201  .debug_macinfo  0 : { *(.debug_macinfo) }
202  /* SGI/MIPS DWARF 2 extensions */
203  .debug_weaknames 0 : { *(.debug_weaknames) }
204  .debug_funcnames 0 : { *(.debug_funcnames) }
205  .debug_typenames 0 : { *(.debug_typenames) }
206  .debug_varnames  0 : { *(.debug_varnames) }
207  /* These must appear regardless of  .  */
208  /* Discard them for now since Intel SoftSDV cannot handle them.
209  .comment 0 : { *(.comment) }
210  .note 0 : { *(.note) }
211  */
212  /DISCARD/ : { *(.comment) }
213  /DISCARD/ : { *(.note) }
214}
215