2 * Copyright (C) 2015 Imagination Technologies
3 * Author: Alex Smith <alex.smith@imgtec.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
13 #include <linux/elfnote.h>
14 #include <linux/version.h>
16 ELFNOTE_START(Linux, 0, "a")
17 .long LINUX_VERSION_CODE
21 * The .MIPS.abiflags section must be defined with the FP ABI flags set
22 * to 'any' to be able to link with both old and new libraries.
23 * Newer toolchains are capable of automatically generating this, but we want
24 * to work with older toolchains as well. Therefore, we define the contents of
25 * this section here (under different names), and then genvdso will patch
26 * it to have the correct name and type.
28 * We base the .MIPS.abiflags section on preprocessor definitions rather than
29 * CONFIG_* because we need to match the particular ABI we are building the
32 * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
33 * for the .MIPS.abiflags section description.
36 .section .mips_abiflags, "a"
39 .hword 0 /* version */
40 .byte __mips /* isa_level */
51 .byte 2 /* AFL_REG_64 */
53 .byte 1 /* AFL_REG_32 */
57 #if (defined(__mips_isa_rev) && __mips_isa_rev >= 6) || defined(__mips64)
58 .byte 2 /* AFL_REG_64 */
60 .byte 1 /* AFL_REG_32 */
63 .byte 0 /* cpr2_size (AFL_REG_NONE) */
64 .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */