blob: de5e21cca6a5a323d6a5eb3232694863cef05a36 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* ld script to make M32R Linux kernel
2 */
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <asm-generic/vmlinux.lds.h>
5#include <asm/addrspace.h>
6#include <asm/page.h>
7
8OUTPUT_ARCH(m32r)
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#if defined(__LITTLE_ENDIAN__)
10 jiffies = jiffies_64;
11#else
12 jiffies = jiffies_64 + 4;
13#endif
Hirokazu Takata3d60f842007-02-10 01:43:39 -080014
15kernel_entry = boot - 0x80000000;
16ENTRY(kernel_entry)
17
Linus Torvalds1da177e2005-04-16 15:20:36 -070018SECTIONS
19{
20 . = CONFIG_MEMORY_START + __PAGE_OFFSET;
21 eit_vector = .;
22
23 . = . + 0x1000;
24 .empty_zero_page : { *(.empty_zero_page) } = 0
25
26 /* read-only */
27 _text = .; /* Text and read-only data */
28 .boot : { *(.boot) } = 0
29 .text : {
Tim Abbott34963692009-04-25 22:11:02 -040030 HEAD_TEXT
Sam Ravnborg76647092007-05-13 00:31:33 +020031 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 SCHED_TEXT
33 LOCK_TEXT
34 *(.fixup)
35 *(.gnu.warning)
36 } = 0x9090
37#ifdef CONFIG_SMP
38 . = ALIGN(65536);
39 .eit_vector4 : { *(.eit_vector4) }
40#endif
41 _etext = .; /* End of text section */
42
43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
47
48 RODATA
49
50 /* writeable */
51 .data : { /* Data */
52 *(.spu)
53 *(.spi)
Sam Ravnborgca967252007-05-17 13:38:44 +020054 DATA_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 CONSTRUCTORS
56 }
57
58 . = ALIGN(4096);
59 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(4096);
62 __nosave_end = .;
63
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 . = ALIGN(32);
65 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
66
67 _edata = .; /* End of data section */
68
69 . = ALIGN(8192); /* init_task */
70 .data.init_task : { *(.data.init_task) }
71
72 /* will be freed after init */
73 . = ALIGN(4096); /* Init code and data */
74 __init_begin = .;
75 .init.text : {
76 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010077 INIT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 _einittext = .;
79 }
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010080 .init.data : { INIT_DATA }
Linus Torvalds1da177e2005-04-16 15:20:36 -070081 . = ALIGN(16);
82 __setup_start = .;
83 .init.setup : { *(.init.setup) }
84 __setup_end = .;
85 __initcall_start = .;
86 .initcall.init : {
Andrew Morton61ce1ef2006-10-27 11:41:44 -070087 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070088 }
89 __initcall_end = .;
90 __con_initcall_start = .;
91 .con_initcall.init : { *(.con_initcall.init) }
92 __con_initcall_end = .;
93 SECURITY_INIT
94 . = ALIGN(4);
95 __alt_instructions = .;
96 .altinstructions : { *(.altinstructions) }
97 __alt_instructions_end = .;
98 .altinstr_replacement : { *(.altinstr_replacement) }
99 /* .exit.text is discard at runtime, not link time, to deal with references
100 from .altinstructions and .eh_frame */
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +0100101 .exit.text : { EXIT_TEXT }
102 .exit.data : { EXIT_DATA }
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800103
104#ifdef CONFIG_BLK_DEV_INITRD
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105 . = ALIGN(4096);
106 __initramfs_start = .;
107 .init.ramfs : { *(.init.ramfs) }
108 __initramfs_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -0800109#endif
110
Fenghua Yu5fb7dc32007-07-19 01:48:12 -0700111 PERCPU(4096)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700112 . = ALIGN(4096);
113 __init_end = .;
114 /* freed after init ends here */
115
116 __bss_start = .; /* BSS */
117 .bss : { *(.bss) }
118 . = ALIGN(4);
119 __bss_stop = .;
120
121 _end = . ;
122
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123 /* Stabs debugging sections. */
124 .stab 0 : { *(.stab) }
125 .stabstr 0 : { *(.stabstr) }
126 .stab.excl 0 : { *(.stab.excl) }
127 .stab.exclstr 0 : { *(.stab.exclstr) }
128 .stab.index 0 : { *(.stab.index) }
129 .stab.indexstr 0 : { *(.stab.indexstr) }
130 .comment 0 : { *(.comment) }
Tejun Heo023bf6f2009-07-09 11:27:40 +0900131
132 /* Sections to be discarded */
133 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134}