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
20 #define HYPERVISOR_TEXT \
22 * Force the alignment to be compatible with \
23 * the vectors requirements \
26 VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \
28 VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \
29 VMLINUX_SYMBOL(__hyp_text_start) = .; \
31 VMLINUX_SYMBOL(__hyp_text_end) = .;
36 * XXX: The linker does not define how output sections are
37 * assigned to input sections when there are multiple statements
38 * matching the same input section name. There is no documented
42 ARM_EXIT_DISCARD(EXIT_TEXT)
43 ARM_EXIT_DISCARD(EXIT_DATA)
49 . = PAGE_OFFSET + TEXT_OFFSET;
55 .text : { /* Real text segment */
56 _stext = .; /* Text and read-only data */
58 __exception_text_start = .;
60 __exception_text_end = .;
69 *(.got) /* Global offset table */
75 _etext = .; /* End of text and rodata section */
82 ARM_EXIT_KEEP(EXIT_TEXT)
94 ARM_EXIT_KEEP(EXIT_DATA)
100 . = ALIGN(THREAD_SIZE);
103 .data : AT(__data_loc) {
104 _data = .; /* address in memory */
108 * first, the init task union, aligned
109 * to an 8192 byte boundary.
111 INIT_TASK_DATA(THREAD_SIZE)
113 CACHELINE_ALIGNED_DATA(64)
117 * and the usual data section
124 _edata_loc = __data_loc + SIZEOF(.data);
130 .comment 0 : { *(.comment) }
134 * The HYP init code can't be more than a page long.
136 ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end),
137 "HYP init code too big")