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