1/* ld script to make Meta Linux kernel */
2
3#include <asm/thread_info.h>
4#include <asm/page.h>
5#include <asm/cache.h>
6
7#include <asm-generic/vmlinux.lds.h>
8
9OUTPUT_FORMAT("elf32-metag", "elf32-metag", "elf32-metag")
10OUTPUT_ARCH(metag)
11ENTRY(__start)
12
13_jiffies = _jiffies_64;
14SECTIONS
15{
16  . = CONFIG_PAGE_OFFSET;
17  _text = .;
18  __text = .;
19  __stext = .;
20  HEAD_TEXT_SECTION
21  .text : {
22	TEXT_TEXT
23	SCHED_TEXT
24	LOCK_TEXT
25	KPROBES_TEXT
26	IRQENTRY_TEXT
27	*(.text.*)
28	*(.gnu.warning)
29	}
30
31  __etext = .;			/* End of text section */
32
33  __sdata = .;
34  RO_DATA_SECTION(PAGE_SIZE)
35  RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
36  __edata = .;			/* End of data section */
37
38  EXCEPTION_TABLE(16)
39  NOTES
40
41  . = ALIGN(PAGE_SIZE);		/* Init code and data */
42  ___init_begin = .;
43  INIT_TEXT_SECTION(PAGE_SIZE)
44  INIT_DATA_SECTION(16)
45
46  .init.arch.info : {
47	  ___arch_info_begin = .;
48	  *(.arch.info.init)
49	  ___arch_info_end = .;
50  }
51
52  PERCPU_SECTION(L1_CACHE_BYTES)
53
54  ___init_end = .;
55
56  BSS_SECTION(0, PAGE_SIZE, 0)
57
58  __end = .;
59
60  . = ALIGN(PAGE_SIZE);
61  __heap_start = .;
62
63  DWARF_DEBUG
64
65  /* When something in the kernel is NOT compiled as a module, the
66   * module cleanup code and data are put into these segments.  Both
67   * can then be thrown away, as cleanup code is never called unless
68   * it's a module.
69   */
70  DISCARDS
71}
72