1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/sizes.h>
3 #include <asm/asm-offsets.h>
4 #include <asm/thread_info.h>
6 #define PAGE_SIZE _PAGE_SIZE
9 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
10 * ensure that it has .bss alignment (64K).
12 #define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
14 #include <asm-generic/vmlinux.lds.h>
15 #include "image-vars.h"
18 * Max avaliable Page Size is 64K, so we set SectionAlignment
19 * field of EFI application to 64K.
21 PECOFF_FILE_ALIGN = 0x200;
22 PECOFF_SEGMENT_ALIGN = 0x10000;
24 OUTPUT_ARCH(loongarch)
27 text PT_LOAD FLAGS(7); /* RWX */
28 note PT_NOTE FLAGS(4); /* R__ */
35 . = VMLINUX_LOAD_ADDRESS;
40 . = ALIGN(PECOFF_SEGMENT_ALIGN);
53 . = ALIGN(PECOFF_SEGMENT_ALIGN);
58 . = ALIGN(PECOFF_SEGMENT_ALIGN);
62 INIT_TEXT_SECTION(PAGE_SIZE)
67 . = ALIGN(PECOFF_SEGMENT_ALIGN);
78 PERCPU_SECTION(1 << CONFIG_L1_CACHE_SHIFT)
81 .rela.dyn : ALIGN(8) { *(.rela.dyn) *(.rela*) }
86 . = ALIGN(PECOFF_SEGMENT_ALIGN);
93 RW_DATA(1 << CONFIG_L1_CACHE_SHIFT, PAGE_SIZE, THREAD_SIZE)
98 .edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGN); }
101 BSS_SECTION(0, SZ_64K, 8)
102 . = ALIGN(PECOFF_SEGMENT_ALIGN);