/* * ld script to make ARM Linux kernel * taken from the i386 version by Russell King * Written by Martin Mares */ #include #include #include #include #include #include "image.h" /* .exit.text needed in case of alternative patching */ #define ARM_EXIT_KEEP(x) x #define ARM_EXIT_DISCARD(x) OUTPUT_ARCH(aarch64) ENTRY(_text) jiffies = jiffies_64; #define HYPERVISOR_TEXT \ /* \ * Force the alignment to be compatible with \ * the vectors requirements \ */ \ . = ALIGN(2048); \ VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ *(.hyp.idmap.text) \ VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \ VMLINUX_SYMBOL(__hyp_text_start) = .; \ *(.hyp.text) \ VMLINUX_SYMBOL(__hyp_text_end) = .; /* * The size of the PE/COFF section that covers the kernel image, which * runs from stext to _edata, must be a round multiple of the PE/COFF * FileAlignment, which we set to its minimum value of 0x200. 'stext' * itself is 4 KB aligned, so padding out _edata to a 0x200 aligned * boundary should be sufficient. */ PECOFF_FILE_ALIGNMENT = 0x200; #ifdef CONFIG_EFI #define PECOFF_EDATA_PADDING \ .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); } #else #define PECOFF_EDATA_PADDING #endif #ifdef CONFIG_DEBUG_ALIGN_RODATA #define ALIGN_DEBUG_RO . = ALIGN(1< __hyp_idmap_text_end), "HYP init code too big") /* * If padding is applied before .head.text, virt<->phys conversions will fail. */ ASSERT(_text == (PAGE_OFFSET + TEXT_OFFSET), "HEAD is misaligned")