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>
14 #define ARM_EXIT_KEEP(x)
15 #define ARM_EXIT_DISCARD(x) x
22 #define HYPERVISOR_TEXT \
24 * Force the alignment to be compatible with \
25 * the vectors requirements \
28 VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \
30 VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \
31 VMLINUX_SYMBOL(__hyp_text_start) = .; \
33 VMLINUX_SYMBOL(__hyp_text_end) = .;
38 * XXX: The linker does not define how output sections are
39 * assigned to input sections when there are multiple statements
40 * matching the same input section name. There is no documented
44 ARM_EXIT_DISCARD(EXIT_TEXT)
45 ARM_EXIT_DISCARD(EXIT_DATA)
51 . = PAGE_OFFSET + TEXT_OFFSET;
57 .text : { /* Real text segment */
58 _stext = .; /* Text and read-only data */
59 __exception_text_start = .;
61 __exception_text_end = .;
70 *(.got) /* Global offset table */
76 _etext = .; /* End of text and rodata section */
83 ARM_EXIT_KEEP(EXIT_TEXT)
95 ARM_EXIT_KEEP(EXIT_DATA)
100 . = ALIGN(PAGE_SIZE);
105 RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE)
110 . = ALIGN(PAGE_SIZE);
114 . += SWAPPER_DIR_SIZE;
124 * The HYP init code can't be more than a page long.
126 ASSERT(((__hyp_idmap_text_start + PAGE_SIZE) > __hyp_idmap_text_end),
127 "HYP init code too big")
130 * If padding is applied before .head.text, virt<->phys conversions will fail.
132 ASSERT(_text == (PAGE_OFFSET + TEXT_OFFSET), "HEAD is misaligned")