blob: 03efaf04d7d7dad17f37a1f95dd454a6b64ea8b3 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* ld script to make m68k Linux kernel */
2
3#include <asm-generic/vmlinux.lds.h>
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +02004#include <asm/page.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
7OUTPUT_ARCH(m68k)
8ENTRY(_start)
9jiffies = jiffies_64 + 4;
10SECTIONS
11{
Sam Creaseya3a79bd2006-12-09 10:34:38 +010012 . = 0xE002000;
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 _text = .; /* Text and read-only data */
14 .text : {
Tim Abbott6f335ca2009-04-25 22:11:03 -040015 HEAD_TEXT
Sam Ravnborg76647092007-05-13 00:31:33 +020016 TEXT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 SCHED_TEXT
Al Viro198a4102006-01-12 01:06:11 -080018 LOCK_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070019 *(.fixup)
20 *(.gnu.warning)
21 } :text = 0x4e75
22 RODATA
23
24 _etext = .; /* End of text section */
25
26 .data : { /* Data */
Sam Ravnborgca967252007-05-17 13:38:44 +020027 DATA_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 CONSTRUCTORS
29 . = ALIGN(16); /* Exception table */
30 __start___ex_table = .;
31 *(__ex_table)
32 __stop___ex_table = .;
33 } :data
34 /* End of data goes *here* so that freeing init code works properly. */
35 _edata = .;
Al Viro877d5242009-01-05 17:28:10 +000036 NOTES
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
38 /* will be freed after init */
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020039 . = ALIGN(PAGE_SIZE); /* Init code and data */
Linus Torvalds1da177e2005-04-16 15:20:36 -070040__init_begin = .;
41 .init.text : {
42 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010043 INIT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070044 _einittext = .;
45 }
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010046 .init.data : { INIT_DATA }
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 . = ALIGN(16);
48 __setup_start = .;
49 .init.setup : { *(.init.setup) }
50 __setup_end = .;
51 __initcall_start = .;
52 .initcall.init : {
Geert Uytterhoeven5fdb51a2006-10-29 11:21:51 +010053 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 }
55 __initcall_end = .;
56 __con_initcall_start = .;
57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .;
Roman Zippelfbe9c962007-05-31 00:40:50 -070059 .m68k_fixup : {
60 __start_fixup = .;
61 *(.m68k_fixup)
62 __stop_fixup = .;
63 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 SECURITY_INIT
Jean-Paul Saman67d38222007-02-10 01:44:44 -080065#ifdef CONFIG_BLK_DEV_INITRD
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020066 . = ALIGN(PAGE_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070067 __initramfs_start = .;
68 .init.ramfs : { *(.init.ramfs) }
69 __initramfs_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -080070#endif
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020071 . = ALIGN(PAGE_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070072 __init_end = .;
Al Viro54a5a6e2006-01-12 01:06:38 -080073 .data.init.task : { *(.data.init_task) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070074
75
76 .bss : { *(.bss) } /* BSS */
77
78 _end = . ;
79
Linus Torvalds1da177e2005-04-16 15:20:36 -070080 .crap : {
81 /* Stabs debugging sections. */
82 *(.stab)
83 *(.stabstr)
84 *(.stab.excl)
85 *(.stab.exclstr)
86 *(.stab.index)
87 *(.stab.indexstr)
88 *(.comment)
89 *(.note)
90 }
91
Tejun Heo023bf6f2009-07-09 11:27:40 +090092 /* Sections to be discarded */
93 DISCARDS
Linus Torvalds1da177e2005-04-16 15:20:36 -070094}