• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* SPDX-License-Identifier: GPL-2.0 */
2/* ld script to make FRV Linux kernel
3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
4 */
5OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
6OUTPUT_ARCH(frv)
7ENTRY(_start)
8
9#include <asm-generic/vmlinux.lds.h>
10#include <asm/processor.h>
11#include <asm/page.h>
12#include <asm/cache.h>
13#include <asm/thread_info.h>
14
15jiffies = jiffies_64 + 4;
16
17__page_offset = CONFIG_PAGE_OFFSET;	/* start of area covered by struct pages */
18__kernel_image_start = __page_offset;	/* address at which kernel image resides */
19
20SECTIONS
21{
22  . = __kernel_image_start;
23
24  /* discardable initialisation code and data */
25  . = ALIGN(PAGE_SIZE);			/* Init code and data */
26  __init_begin = .;
27
28  _sinittext = .;
29  .init.text : {
30	HEAD_TEXT
31#ifndef CONFIG_DEBUG_INFO
32	INIT_TEXT
33	EXIT_TEXT
34	EXIT_DATA
35	*(.exitcall.exit)
36#endif
37  }
38  _einittext = .;
39
40  INIT_DATA_SECTION(8)
41  PERCPU_SECTION(L1_CACHE_BYTES)
42
43  . = ALIGN(PAGE_SIZE);
44  __init_end = .;
45
46  .trap : {
47	/* trap table management - read entry-table.S before modifying */
48	. = ALIGN(8192);
49	__trap_tables = .;
50	*(.trap.user)
51	*(.trap.kernel)
52	. = ALIGN(4096);
53	*(.trap.break)
54  }
55
56  /* Text and read-only data */
57  . = ALIGN(4);
58  _text = .;
59  _stext = .;
60  .text : {
61	*(.text..start)
62	*(.text..entry)
63	*(.text..break)
64	*(.text..tlbmiss)
65	TEXT_TEXT
66	SCHED_TEXT
67	CPUIDLE_TEXT
68	LOCK_TEXT
69#ifdef CONFIG_DEBUG_INFO
70	INIT_TEXT
71	EXIT_TEXT
72	*(.exitcall.exit)
73#endif
74	*(.fixup)
75	*(.gnu.warning)
76	*(.exitcall.exit)
77	} = 0x9090
78
79  _etext = .;			/* End of text section */
80
81  RODATA
82
83  .rodata : {
84	*(.trap.vector)
85
86	/* this clause must not be modified - the ordering and adjacency are imperative */
87	__trap_fixup_tables = .;
88	*(.trap.fixup.user .trap.fixup.kernel)
89
90	}
91
92  EXCEPTION_TABLE(8)
93
94  _sdata = .;
95  .data : {			/* Data */
96	INIT_TASK_DATA(THREAD_SIZE)
97	CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
98	DATA_DATA
99	*(.data.*)
100	EXIT_DATA
101	CONSTRUCTORS
102	}
103
104  _edata = .;			/* End of data section */
105
106  BUG_TABLE
107
108  /* GP section */
109  . = ALIGN(L1_CACHE_BYTES);
110  _gp = . + 2048;
111  PROVIDE (gp = _gp);
112
113  .sdata : { *(.sdata .sdata.*) }
114
115  /* BSS */
116  . = ALIGN(L1_CACHE_BYTES);
117  __bss_start = .;
118
119  .sbss		: { *(.sbss .sbss.*) }
120  .bss		: { *(.bss .bss.*) }
121  .bss..stack	: { *(.bss) }
122
123  __bss_stop = .;
124  _end = . ;
125  . = ALIGN(PAGE_SIZE);
126  __kernel_image_end = .;
127
128  STABS_DEBUG
129  DWARF_DEBUG
130
131  .comment 0 : { *(.comment) }
132
133  DISCARDS
134}
135
136__kernel_image_size_no_bss = __bss_start - __kernel_image_start;
137