aboutsummaryrefslogtreecommitdiff
path: root/arch/frv/kernel/vmlinux.lds.S
blob: 9c1fb12367fa3cfbedf6b8abe926fc40eb0e431e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/* ld script to make FRV Linux kernel
 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
 */
OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
OUTPUT_ARCH(frv)
ENTRY(_start)

#include <asm-generic/vmlinux.lds.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/cache.h>
#include <asm/thread_info.h>

jiffies = jiffies_64 + 4;

__page_offset = 0xc0000000;		/* start of area covered by struct pages */
__kernel_image_start = __page_offset;	/* address at which kernel image resides */

SECTIONS
{
  . = __kernel_image_start;

  /* discardable initialisation code and data */
  . = ALIGN(PAGE_SIZE);			/* Init code and data */
  __init_begin = .;

  _sinittext = .;
  .init.text : {
	*(.text.head)
#ifndef CONFIG_DEBUG_INFO
	*(.init.text)
	*(.exit.text)
	*(.exit.data)
	*(.exitcall.exit)
#endif
  }
  _einittext = .;
  .init.data : { *(.init.data) }

  . = ALIGN(8);
  __setup_start = .;
  .setup.init : { KEEP(*(.init.setup)) }
  __setup_end = .;

  __initcall_start = .;
  .initcall.init : {
	INITCALLS
  }
  __initcall_end = .;
  __con_initcall_start = .;
  .con_initcall.init : { *(.con_initcall.init) }
  __con_initcall_end = .;
  SECURITY_INIT
  . = ALIGN(4);
  __alt_instructions = .;
  .altinstructions : { *(.altinstructions) }
  __alt_instructions_end = .;
 .altinstr_replacement : { *(.altinstr_replacement) }

  __per_cpu_start = .;
  .data.percpu  : { *(.data.percpu) }
  __per_cpu_end = .;

  . = ALIGN(4096);
  __initramfs_start = .;
  .init.ramfs : { *(.init.ramfs) }
  __initramfs_end = .;

  . = ALIGN(THREAD_SIZE);
  __init_end = .;

  /* put sections together that have massive alignment issues */
  . = ALIGN(THREAD_SIZE);
  .data.init_task : {
	  /* init task record & stack */
	  *(.data.init_task)
  }

  .trap : {
	/* trap table management - read entry-table.S before modifying */
	. = ALIGN(8192);
	__trap_tables = .;
	*(.trap.user)
	*(.trap.kernel)
	. = ALIGN(4096);
	*(.trap.break)
  }

  . = ALIGN(4096);
  .data.page_aligned : { *(.data.idt) }

  . = ALIGN(L1_CACHE_BYTES);
  .data.cacheline_aligned : { *(.data.cacheline_aligned) }

  /* Text and read-only data */
  . = ALIGN(4);
  _text = .;
  _stext = .;
  .text : {
	*(
		.text.start .text .text.*
#ifdef CONFIG_DEBUG_INFO
	.init.text
	.exit.text
	.exitcall.exit
#endif
	)
	SCHED_TEXT
	LOCK_TEXT
	*(.fixup)
	*(.gnu.warning)
	*(.exitcall.exit)
	} = 0x9090

  _etext = .;			/* End of text section */

  RODATA

  .rodata : {
	*(.trap.vector)

	/* this clause must not be modified - the ordering and adjacency are imperative */
	__trap_fixup_tables = .;
	*(.trap.fixup.user .trap.fixup.kernel)

	}

  . = ALIGN(8);		/* Exception table */
  __start___ex_table = .;
  __ex_table : { KEEP(*(__ex_table)) }
  __stop___ex_table = .;

  _sdata = .;
  .data : {			/* Data */
	*(.data .data.*)
	*(.exit.data)
	CONSTRUCTORS
	}

  _edata = .;			/* End of data section */

  /* GP section */
  . = ALIGN(L1_CACHE_BYTES);
  _gp = . + 2048;
  PROVIDE (gp = _gp);

  .sdata : { *(.sdata .sdata.*) }

  /* BSS */
  . = ALIGN(L1_CACHE_BYTES);
  __bss_start = .;

  .sbss		: { *(.sbss .sbss.*) }
  .bss		: { *(.bss .bss.*) }
  .bss.stack	: { *(.bss) }

  __bss_stop = .;
  _end = . ;
  . = ALIGN(PAGE_SIZE);
  __kernel_image_end = .;

  /* Stabs debugging sections.  */
  .stab 0 : { *(.stab) }
  .stabstr 0 : { *(.stabstr) }
  .stab.excl 0 : { *(.stab.excl) }
  .stab.exclstr 0 : { *(.stab.exclstr) }
  .stab.index 0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }

  .debug_line		0 : { *(.debug_line) }
  .debug_info		0 : { *(.debug_info) }
  .debug_abbrev		0 : { *(.debug_abbrev) }
  .debug_aranges	0 : { *(.debug_aranges) }
  .debug_frame		0 : { *(.debug_frame) }
  .debug_pubnames	0 : { *(.debug_pubnames) }
  .debug_str		0 : { *(.debug_str) }
  .debug_ranges		0 : { *(.debug_ranges) }

  .comment 0 : { *(.comment) }
}

__kernel_image_size_no_bss = __bss_start - __kernel_image_start;