blob: aa6e573d57da46d1cb05bec37cb9dfcc7bfac13f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* ld script to make FRV Linux kernel
2 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
3 */
4OUTPUT_FORMAT("elf32-frv", "elf32-frv", "elf32-frv")
5OUTPUT_ARCH(frv)
6ENTRY(_start)
7
8#include <asm-generic/vmlinux.lds.h>
9#include <asm/processor.h>
10#include <asm/page.h>
11#include <asm/cache.h>
12#include <asm/thread_info.h>
13
14jiffies = jiffies_64 + 4;
15
David Howells70382202008-02-04 22:29:53 -080016__page_offset = CONFIG_PAGE_OFFSET; /* start of area covered by struct pages */
Linus Torvalds1da177e2005-04-16 15:20:36 -070017__kernel_image_start = __page_offset; /* address at which kernel image resides */
18
19SECTIONS
20{
21 . = __kernel_image_start;
22
23 /* discardable initialisation code and data */
24 . = ALIGN(PAGE_SIZE); /* Init code and data */
25 __init_begin = .;
26
27 _sinittext = .;
28 .init.text : {
Tim Abbottb6a8d952009-04-25 22:10:59 -040029 HEAD_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#ifndef CONFIG_DEBUG_INFO
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010031 INIT_TEXT
32 EXIT_TEXT
33 EXIT_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 *(.exitcall.exit)
35#endif
36 }
37 _einittext = .;
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Nelson Elhage9c88b252009-09-18 15:52:08 -040039 INIT_DATA_SECTION(8)
Tejun Heo0415b00d12011-03-24 18:50:09 +010040 PERCPU_SECTION(L1_CACHE_BYTES)
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
Nelson Elhage9c88b252009-09-18 15:52:08 -040042 . = ALIGN(PAGE_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 __init_end = .;
44
Linus Torvalds1da177e2005-04-16 15:20:36 -070045 .trap : {
46 /* trap table management - read entry-table.S before modifying */
47 . = ALIGN(8192);
48 __trap_tables = .;
49 *(.trap.user)
50 *(.trap.kernel)
51 . = ALIGN(4096);
52 *(.trap.break)
53 }
54
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 /* Text and read-only data */
56 . = ALIGN(4);
57 _text = .;
58 _stext = .;
59 .text : {
Denys Vlasenkob6f4e452010-02-20 01:03:56 +010060 *(.text..start)
61 *(.text..entry)
62 *(.text..break)
63 *(.text..tlbmiss)
Sam Ravnborg76647092007-05-13 00:31:33 +020064 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070065 SCHED_TEXT
Chris Metcalf6727ad92016-10-07 17:02:55 -070066 CPUIDLE_TEXT
David Howells41be6ae2006-01-08 01:01:25 -080067 LOCK_TEXT
David Howells3c835672007-11-28 16:22:05 -080068#ifdef CONFIG_DEBUG_INFO
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010069 INIT_TEXT
70 EXIT_TEXT
David Howellsd897d2b2008-02-13 16:10:08 +000071 *(.exitcall.exit)
David Howells3c835672007-11-28 16:22:05 -080072#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070073 *(.fixup)
74 *(.gnu.warning)
75 *(.exitcall.exit)
76 } = 0x9090
77
78 _etext = .; /* End of text section */
79
80 RODATA
81
82 .rodata : {
83 *(.trap.vector)
84
85 /* this clause must not be modified - the ordering and adjacency are imperative */
86 __trap_fixup_tables = .;
87 *(.trap.fixup.user .trap.fixup.kernel)
88
89 }
90
Nelson Elhage9c88b252009-09-18 15:52:08 -040091 EXCEPTION_TABLE(8)
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
93 _sdata = .;
94 .data : { /* Data */
Nelson Elhage9c88b252009-09-18 15:52:08 -040095 INIT_TASK_DATA(THREAD_SIZE)
96 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
Sam Ravnborgca967252007-05-17 13:38:44 +020097 DATA_DATA
98 *(.data.*)
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010099 EXIT_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 CONSTRUCTORS
101 }
102
103 _edata = .; /* End of data section */
104
105 /* GP section */
106 . = ALIGN(L1_CACHE_BYTES);
107 _gp = . + 2048;
108 PROVIDE (gp = _gp);
109
110 .sdata : { *(.sdata .sdata.*) }
111
112 /* BSS */
113 . = ALIGN(L1_CACHE_BYTES);
114 __bss_start = .;
115
116 .sbss : { *(.sbss .sbss.*) }
117 .bss : { *(.bss .bss.*) }
Denys Vlasenko1360e072010-02-20 01:03:39 +0100118 .bss..stack : { *(.bss) }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119
120 __bss_stop = .;
121 _end = . ;
122 . = ALIGN(PAGE_SIZE);
123 __kernel_image_end = .;
124
Nelson Elhage9c88b252009-09-18 15:52:08 -0400125 STABS_DEBUG
126 DWARF_DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127
128 .comment 0 : { *(.comment) }
Tejun Heo405d9672009-06-24 15:13:38 +0900129
Tejun Heo023bf6f2009-07-09 11:27:40 +0900130 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131}
132
133__kernel_image_size_no_bss = __bss_start - __kernel_image_start;