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 */
57 __exception_text_start = .;
59 __exception_text_end = .;
68 *(.got) /* Global offset table */
74 _etext = .; /* End of text and rodata section */
81 ARM_EXIT_KEEP(EXIT_TEXT)
93 ARM_EXIT_KEEP(EXIT_DATA)
100 . = ALIGN(PAGE_SIZE);
103 RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
113 * The HYP init code can't be more than a page long.
115 ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end),
116 "HYP init code too big")