18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2015 Imagination Technologies 48c2ecf20Sopenharmony_ci * Author: Alex Smith <alex.smith@imgtec.com> 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <asm/vdso/vdso.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <asm/isa-rev.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/elfnote.h> 128c2ecf20Sopenharmony_ci#include <linux/version.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciELFNOTE_START(Linux, 0, "a") 158c2ecf20Sopenharmony_ci .long LINUX_VERSION_CODE 168c2ecf20Sopenharmony_ciELFNOTE_END 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* 198c2ecf20Sopenharmony_ci * The .MIPS.abiflags section must be defined with the FP ABI flags set 208c2ecf20Sopenharmony_ci * to 'any' to be able to link with both old and new libraries. 218c2ecf20Sopenharmony_ci * Newer toolchains are capable of automatically generating this, but we want 228c2ecf20Sopenharmony_ci * to work with older toolchains as well. Therefore, we define the contents of 238c2ecf20Sopenharmony_ci * this section here (under different names), and then genvdso will patch 248c2ecf20Sopenharmony_ci * it to have the correct name and type. 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * We base the .MIPS.abiflags section on preprocessor definitions rather than 278c2ecf20Sopenharmony_ci * CONFIG_* because we need to match the particular ABI we are building the 288c2ecf20Sopenharmony_ci * VDSO for. 298c2ecf20Sopenharmony_ci * 308c2ecf20Sopenharmony_ci * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking 318c2ecf20Sopenharmony_ci * for the .MIPS.abiflags section description. 328c2ecf20Sopenharmony_ci */ 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci .section .mips_abiflags, "a" 358c2ecf20Sopenharmony_ci .align 3 368c2ecf20Sopenharmony_ci__mips_abiflags: 378c2ecf20Sopenharmony_ci .hword 0 /* version */ 388c2ecf20Sopenharmony_ci .byte __mips /* isa_level */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci /* isa_rev */ 418c2ecf20Sopenharmony_ci .byte MIPS_ISA_REV 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci /* gpr_size */ 448c2ecf20Sopenharmony_ci#ifdef __mips64 458c2ecf20Sopenharmony_ci .byte 2 /* AFL_REG_64 */ 468c2ecf20Sopenharmony_ci#else 478c2ecf20Sopenharmony_ci .byte 1 /* AFL_REG_32 */ 488c2ecf20Sopenharmony_ci#endif 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci /* cpr1_size */ 518c2ecf20Sopenharmony_ci#if (MIPS_ISA_REV >= 6) || defined(__mips64) 528c2ecf20Sopenharmony_ci .byte 2 /* AFL_REG_64 */ 538c2ecf20Sopenharmony_ci#else 548c2ecf20Sopenharmony_ci .byte 1 /* AFL_REG_32 */ 558c2ecf20Sopenharmony_ci#endif 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci .byte 0 /* cpr2_size (AFL_REG_NONE) */ 588c2ecf20Sopenharmony_ci .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */ 598c2ecf20Sopenharmony_ci .word 0 /* isa_ext */ 608c2ecf20Sopenharmony_ci .word 0 /* ases */ 618c2ecf20Sopenharmony_ci .word 0 /* flags1 */ 628c2ecf20Sopenharmony_ci .word 0 /* flags2 */ 63