1 /* MN10300 Main kernel linker script
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
11 #define __VMLINUX_LDS__
12 #include <asm-generic/vmlinux.lds.h>
13 #include <asm/thread_info.h>
16 OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
20 #ifndef CONFIG_MN10300_CURRENT_IN_E2
25 . = CONFIG_KERNEL_TEXT_ADDRESS;
28 _text = .; /* Text and read-only data */
39 _etext = .; /* End of text section */
41 . = ALIGN(16); /* Exception table */
42 __start___ex_table = .;
43 __ex_table : { *(__ex_table) }
44 __stop___ex_table = .;
58 .data_nosave : { *(.data.nosave) }
63 .data.page_aligned : { *(.data.idt) }
66 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
68 /* rarely changed data like cpu maps */
70 .data.read_mostly : AT(ADDR(.data.read_mostly)) {
72 _edata = .; /* End of data section */
75 . = ALIGN(THREAD_SIZE); /* init_task */
76 .data.init_task : { *(.data.init_task) }
78 /* might get freed after init */
80 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
86 /* will be freed after init */
87 . = ALIGN(PAGE_SIZE); /* Init code and data */
94 .init.data : { *(.init.data) }
97 .setup.init : { KEEP(*(.init.setup)) }
100 __initcall_start = .;
105 __con_initcall_start = .;
106 .con_initcall.init : { *(.con_initcall.init) }
107 __con_initcall_end = .;
111 __alt_instructions = .;
112 .altinstructions : { *(.altinstructions) }
113 __alt_instructions_end = .;
114 .altinstr_replacement : { *(.altinstr_replacement) }
115 /* .exit.text is discard at runtime, not link time, to deal with references
116 from .altinstructions and .eh_frame */
117 .exit.text : { *(.exit.text) }
118 .exit.data : { *(.exit.data) }
120 #ifdef CONFIG_BLK_DEV_INITRD
121 . = ALIGN(PAGE_SIZE);
122 __initramfs_start = .;
123 .init.ramfs : { *(.init.ramfs) }
128 . = ALIGN(PAGE_SIZE);
130 /* freed after init ends here */
132 __bss_start = .; /* BSS */
142 /* This is where the kernel creates the early boot page tables */
143 . = ALIGN(PAGE_SIZE);
146 /* Sections to be discarded */