blob: 8a4919e4d36a4ef23c996b4a3f4a4dc51d4ddb1e [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 : {
Al Viro7e5de052007-07-20 04:33:08 +010015 *(.text.head)
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 = .;
36
37 /* will be freed after init */
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020038 . = ALIGN(PAGE_SIZE); /* Init code and data */
Linus Torvalds1da177e2005-04-16 15:20:36 -070039__init_begin = .;
40 .init.text : {
41 _sinittext = .;
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010042 INIT_TEXT
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 _einittext = .;
44 }
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010045 .init.data : { INIT_DATA }
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 . = ALIGN(16);
47 __setup_start = .;
48 .init.setup : { *(.init.setup) }
49 __setup_end = .;
50 __initcall_start = .;
51 .initcall.init : {
Geert Uytterhoeven5fdb51a2006-10-29 11:21:51 +010052 INITCALLS
Linus Torvalds1da177e2005-04-16 15:20:36 -070053 }
54 __initcall_end = .;
55 __con_initcall_start = .;
56 .con_initcall.init : { *(.con_initcall.init) }
57 __con_initcall_end = .;
Roman Zippelfbe9c962007-05-31 00:40:50 -070058 .m68k_fixup : {
59 __start_fixup = .;
60 *(.m68k_fixup)
61 __stop_fixup = .;
62 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070063 SECURITY_INIT
Jean-Paul Saman67d38222007-02-10 01:44:44 -080064#ifdef CONFIG_BLK_DEV_INITRD
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020065 . = ALIGN(PAGE_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070066 __initramfs_start = .;
67 .init.ramfs : { *(.init.ramfs) }
68 __initramfs_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -080069#endif
Cyrill Gorcunov97d26e72008-07-17 21:16:11 +020070 . = ALIGN(PAGE_SIZE);
Linus Torvalds1da177e2005-04-16 15:20:36 -070071 __init_end = .;
Al Viro54a5a6e2006-01-12 01:06:38 -080072 .data.init.task : { *(.data.init_task) }
Linus Torvalds1da177e2005-04-16 15:20:36 -070073
74
75 .bss : { *(.bss) } /* BSS */
76
77 _end = . ;
78
79 /* Sections to be discarded */
80 /DISCARD/ : {
Sam Ravnborg01ba2bd2008-01-20 14:15:03 +010081 EXIT_TEXT
82 EXIT_DATA
Linus Torvalds1da177e2005-04-16 15:20:36 -070083 *(.exitcall.exit)
84 }
85
86 .crap : {
87 /* Stabs debugging sections. */
88 *(.stab)
89 *(.stabstr)
90 *(.stab.excl)
91 *(.stab.exclstr)
92 *(.stab.index)
93 *(.stab.indexstr)
94 *(.comment)
95 *(.note)
96 }
97
98}