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 */
45 __exception_text_start = .;
47 __exception_text_end = .;
55 *(.got) /* Global offset table */
60 _etext = .; /* End of text and rodata section */
67 ARM_EXIT_KEEP(EXIT_TEXT)
79 ARM_EXIT_KEEP(EXIT_DATA)
85 . = ALIGN(THREAD_SIZE);
88 .data : AT(__data_loc) {
89 _data = .; /* address in memory */
93 * first, the init task union, aligned
94 * to an 8192 byte boundary.
96 INIT_TASK_DATA(THREAD_SIZE)
98 CACHELINE_ALIGNED_DATA(64)
102 * The exception fixup table (might need resorting at runtime)
105 __start___ex_table = .;
107 __stop___ex_table = .;
110 * and the usual data section
117 _edata_loc = __data_loc + SIZEOF(.data);
125 .comment 0 : { *(.comment) }