1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2015 Imagination Technologies
4 * Author: Alex Smith <alex.smith@imgtec.com>
7 #include <asm/vdso/vdso.h>
9 #include <asm/isa-rev.h>
11 #include <linux/elfnote.h>
12 #include <linux/version.h>
14 ELFNOTE_START(Linux, 0, "a")
15 .long LINUX_VERSION_CODE
19 * The .MIPS.abiflags section must be defined with the FP ABI flags set
20 * to 'any' to be able to link with both old and new libraries.
21 * Newer toolchains are capable of automatically generating this, but we want
22 * to work with older toolchains as well. Therefore, we define the contents of
23 * this section here (under different names), and then genvdso will patch
24 * it to have the correct name and type.
26 * We base the .MIPS.abiflags section on preprocessor definitions rather than
27 * CONFIG_* because we need to match the particular ABI we are building the
30 * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
31 * for the .MIPS.abiflags section description.
34 .section .mips_abiflags, "a"
37 .hword 0 /* version */
38 .byte __mips /* isa_level */
45 .byte 2 /* AFL_REG_64 */
47 .byte 1 /* AFL_REG_32 */
51 #if (MIPS_ISA_REV >= 6) || defined(__mips64)
52 .byte 2 /* AFL_REG_64 */
54 .byte 1 /* AFL_REG_32 */
57 .byte 0 /* cpr2_size (AFL_REG_NONE) */
58 .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */