2 * ld script to make ARM Linux kernel
3 * taken from the i386 version by Russell King
4 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
7 #include <asm-generic/vmlinux.lds.h>
8 #include <asm/thread_info.h>
9 #include <asm/memory.h>
12 #define ARM_EXIT_KEEP(x)
13 #define ARM_EXIT_DISCARD(x) x
23 * XXX: The linker does not define how output sections are
24 * assigned to input sections when there are multiple statements
25 * matching the same input section name. There is no documented
29 ARM_EXIT_DISCARD(EXIT_TEXT)
30 ARM_EXIT_DISCARD(EXIT_DATA)
36 . = PAGE_OFFSET + TEXT_OFFSET;
42 .text : { /* Real text segment */
43 _stext = .; /* Text and read-only data */
44 __exception_text_start = .;
46 __exception_text_end = .;
54 *(.got) /* Global offset table */
59 _etext = .; /* End of text and rodata section */
66 ARM_EXIT_KEEP(EXIT_TEXT)
78 ARM_EXIT_KEEP(EXIT_DATA)
84 . = ALIGN(THREAD_SIZE);
87 .data : AT(__data_loc) {
88 _data = .; /* address in memory */
92 * first, the init task union, aligned
93 * to an 8192 byte boundary.
95 INIT_TASK_DATA(THREAD_SIZE)
97 CACHELINE_ALIGNED_DATA(64)
101 * The exception fixup table (might need resorting at runtime)
104 __start___ex_table = .;
106 __stop___ex_table = .;
109 * and the usual data section
116 _edata_loc = __data_loc + SIZEOF(.data);
124 .comment 0 : { *(.comment) }