]>
Commit | Line | Data |
---|---|---|
2874c5fd | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
ebb5e78c AS |
2 | /* |
3 | * Copyright (C) 2015 Imagination Technologies | |
4 | * Author: Alex Smith <alex.smith@imgtec.com> | |
ebb5e78c AS |
5 | */ |
6 | ||
7 | #include "vdso.h" | |
8 | ||
ce6828fa MR |
9 | #include <asm/isa-rev.h> |
10 | ||
ebb5e78c AS |
11 | #include <linux/elfnote.h> |
12 | #include <linux/version.h> | |
13 | ||
14 | ELFNOTE_START(Linux, 0, "a") | |
15 | .long LINUX_VERSION_CODE | |
16 | ELFNOTE_END | |
17 | ||
18 | /* | |
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. | |
25 | * | |
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 | |
28 | * VDSO for. | |
29 | * | |
30 | * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking | |
31 | * for the .MIPS.abiflags section description. | |
32 | */ | |
33 | ||
34 | .section .mips_abiflags, "a" | |
35 | .align 3 | |
36 | __mips_abiflags: | |
37 | .hword 0 /* version */ | |
38 | .byte __mips /* isa_level */ | |
39 | ||
40 | /* isa_rev */ | |
ce6828fa | 41 | .byte MIPS_ISA_REV |
ebb5e78c AS |
42 | |
43 | /* gpr_size */ | |
44 | #ifdef __mips64 | |
45 | .byte 2 /* AFL_REG_64 */ | |
46 | #else | |
47 | .byte 1 /* AFL_REG_32 */ | |
48 | #endif | |
49 | ||
50 | /* cpr1_size */ | |
ce6828fa | 51 | #if (MIPS_ISA_REV >= 6) || defined(__mips64) |
ebb5e78c AS |
52 | .byte 2 /* AFL_REG_64 */ |
53 | #else | |
54 | .byte 1 /* AFL_REG_32 */ | |
55 | #endif | |
56 | ||
57 | .byte 0 /* cpr2_size (AFL_REG_NONE) */ | |
58 | .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */ | |
59 | .word 0 /* isa_ext */ | |
60 | .word 0 /* ases */ | |
61 | .word 0 /* flags1 */ | |
62 | .word 0 /* flags2 */ |