1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Author: Huacai Chen <chenhuacai@loongson.cn>
4 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
7 #include <generated/asm-offsets.h>
9 OUTPUT_FORMAT("elf64-loongarch", "elf64-loongarch", "elf64-loongarch")
11 OUTPUT_ARCH(loongarch)
15 PROVIDE(_vdso_data = . - __VVAR_PAGES * PAGE_SIZE);
17 PROVIDE(_timens_data = _vdso_data + PAGE_SIZE);
19 PROVIDE(_loongarch_data = _vdso_data + 2 * PAGE_SIZE);
22 .hash : { *(.hash) } :text
23 .gnu.hash : { *(.gnu.hash) }
24 .dynsym : { *(.dynsym) }
25 .dynstr : { *(.dynstr) }
26 .gnu.version : { *(.gnu.version) }
27 .gnu.version_d : { *(.gnu.version_d) }
28 .gnu.version_r : { *(.gnu.version_r) }
30 .note : { *(.note.*) } :text :note
32 .text : { *(.text*) } :text
33 PROVIDE (__etext = .);
37 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
38 .eh_frame : { KEEP (*(.eh_frame)) } :text
40 .dynamic : { *(.dynamic) } :text :dynamic
42 .rodata : { *(.rodata*) } :text
50 *(.data .data.* .gnu.linkonce.d.* .sdata*)
51 *(.bss .sbss .dynbss .dynsbss)
57 text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
58 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
59 note PT_NOTE FLAGS(4); /* PF_R */
60 eh_frame_hdr PT_GNU_EH_FRAME;
78 * Make the sigreturn code visible to the kernel.
80 VDSO_sigreturn = __vdso_rt_sigreturn;