1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2015 Imagination Technologies 4 * Author: Alex Smith <alex.smith@imgtec.com> 5 */ 6 7#include <asm/vdso/vdso.h> 8 9#include <asm/isa-rev.h> 10 11#include <linux/build-salt.h> 12#include <linux/elfnote.h> 13#include <linux/version.h> 14 15ELFNOTE_START(Linux, 0, "a") 16 .long LINUX_VERSION_CODE 17ELFNOTE_END 18 19BUILD_SALT 20 21/* 22 * The .MIPS.abiflags section must be defined with the FP ABI flags set 23 * to 'any' to be able to link with both old and new libraries. 24 * Newer toolchains are capable of automatically generating this, but we want 25 * to work with older toolchains as well. Therefore, we define the contents of 26 * this section here (under different names), and then genvdso will patch 27 * it to have the correct name and type. 28 * 29 * We base the .MIPS.abiflags section on preprocessor definitions rather than 30 * CONFIG_* because we need to match the particular ABI we are building the 31 * VDSO for. 32 * 33 * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking 34 * for the .MIPS.abiflags section description. 35 */ 36 37 .section .mips_abiflags, "a" 38 .align 3 39__mips_abiflags: 40 .hword 0 /* version */ 41 .byte __mips /* isa_level */ 42 43 /* isa_rev */ 44 .byte MIPS_ISA_REV 45 46 /* gpr_size */ 47#ifdef __mips64 48 .byte 2 /* AFL_REG_64 */ 49#else 50 .byte 1 /* AFL_REG_32 */ 51#endif 52 53 /* cpr1_size */ 54#if (MIPS_ISA_REV >= 6) || defined(__mips64) 55 .byte 2 /* AFL_REG_64 */ 56#else 57 .byte 1 /* AFL_REG_32 */ 58#endif 59 60 .byte 0 /* cpr2_size (AFL_REG_NONE) */ 61 .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */ 62 .word 0 /* isa_ext */ 63 .word 0 /* ases */ 64 .word 0 /* flags1 */ 65 .word 0 /* flags2 */ 66