Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright (C) 2015 Imagination Technologies
0004  * Author: Alex Smith <alex.smith@imgtec.com>
0005  */
0006 
0007 #include <asm/vdso/vdso.h>
0008 
0009 #include <asm/isa-rev.h>
0010 
0011 #include <linux/elfnote.h>
0012 #include <linux/version.h>
0013 
0014 ELFNOTE_START(Linux, 0, "a")
0015     .long LINUX_VERSION_CODE
0016 ELFNOTE_END
0017 
0018 /*
0019  * The .MIPS.abiflags section must be defined with the FP ABI flags set
0020  * to 'any' to be able to link with both old and new libraries.
0021  * Newer toolchains are capable of automatically generating this, but we want
0022  * to work with older toolchains as well. Therefore, we define the contents of
0023  * this section here (under different names), and then genvdso will patch
0024  * it to have the correct name and type.
0025  *
0026  * We base the .MIPS.abiflags section on preprocessor definitions rather than
0027  * CONFIG_* because we need to match the particular ABI we are building the
0028  * VDSO for.
0029  *
0030  * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
0031  * for the .MIPS.abiflags section description.
0032  */
0033 
0034     .section .mips_abiflags, "a"
0035     .align 3
0036 __mips_abiflags:
0037     .hword  0       /* version */
0038     .byte   __mips      /* isa_level */
0039 
0040     /* isa_rev */
0041     .byte   MIPS_ISA_REV
0042 
0043     /* gpr_size */
0044 #ifdef __mips64
0045     .byte   2       /* AFL_REG_64 */
0046 #else
0047     .byte   1       /* AFL_REG_32 */
0048 #endif
0049 
0050     /* cpr1_size */
0051 #if (MIPS_ISA_REV >= 6) || defined(__mips64)
0052     .byte   2       /* AFL_REG_64 */
0053 #else
0054     .byte   1       /* AFL_REG_32 */
0055 #endif
0056 
0057     .byte   0       /* cpr2_size (AFL_REG_NONE) */
0058     .byte   0       /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */
0059     .word   0       /* isa_ext */
0060     .word   0       /* ases */
0061     .word   0       /* flags1 */
0062     .word   0       /* flags2 */