1 /* ld script to make ARM Linux kernel
2 * taken from the i386 version by Russell King
3 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
6 #include <asm-generic/vmlinux.lds.h>
7 #include <asm/thread_info.h>
8 #include <asm/memory.h>
16 jiffies = jiffies_64 + 4;
21 #ifdef CONFIG_XIP_KERNEL
22 . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
24 . = PAGE_OFFSET + TEXT_OFFSET;
32 .init : { /* Init code and data */
35 __proc_info_begin = .;
38 __arch_info_begin = .;
54 __con_initcall_start = .;
56 __con_initcall_end = .;
57 __security_initcall_start = .;
58 *(.security_initcall.init)
59 __security_initcall_end = .;
60 #ifdef CONFIG_BLK_DEV_INITRD
62 __initramfs_start = .;
63 usr/built-in.o(.init.ramfs)
69 *(.data.percpu.page_aligned)
71 *(.data.percpu.shared_aligned)
73 #ifndef CONFIG_XIP_KERNEL
74 __init_begin = _stext;
81 /DISCARD/ : { /* Exit code and data */
85 *(.ARM.exidx.exit.text)
86 *(.ARM.extab.exit.text)
93 .text : { /* Real text segment */
94 _text = .; /* Text and read-only data */
95 __exception_text_start = .;
97 __exception_text_end = .;
110 *(.got) /* Global offset table */
115 _etext = .; /* End of text and rodata section */
117 #ifdef CONFIG_ARM_UNWIND
119 * Stack unwinding tables
123 __start_unwind_idx = .;
125 __stop_unwind_idx = .;
128 __start_unwind_tab = .;
130 __stop_unwind_tab = .;
134 #ifdef CONFIG_XIP_KERNEL
135 __data_loc = ALIGN(4); /* location in binary */
136 . = PAGE_OFFSET + TEXT_OFFSET;
138 . = ALIGN(THREAD_SIZE);
142 .data : AT(__data_loc) {
143 _data = .; /* address in memory */
147 * first, the init task union, aligned
148 * to an 8192 byte boundary.
152 #ifdef CONFIG_XIP_KERNEL
167 * then the cacheline aligned data
170 *(.data.cacheline_aligned)
173 * The exception fixup table (might need resorting at runtime)
176 __start___ex_table = .;
180 __stop___ex_table = .;
183 * and the usual data section
190 _edata_loc = __data_loc + SIZEOF(.data);
193 __bss_start = .; /* BSS */
199 /* Stabs debugging sections. */
200 .stab 0 : { *(.stab) }
201 .stabstr 0 : { *(.stabstr) }
202 .stab.excl 0 : { *(.stab.excl) }
203 .stab.exclstr 0 : { *(.stab.exclstr) }
204 .stab.index 0 : { *(.stab.index) }
205 .stab.indexstr 0 : { *(.stab.indexstr) }
206 .comment 0 : { *(.comment) }
210 * These must never be empty
211 * If you have to comment these two assert statements out, your
212 * binutils is too old (for other reasons as well)
214 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
215 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")