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 <asm/isa-rev.h>
15 #include <linux/elfnote.h>
16 #include <linux/version.h>
18 ELFNOTE_START(Linux, 0, "a")
19 .long LINUX_VERSION_CODE
23 * The .MIPS.abiflags section must be defined with the FP ABI flags set
24 * to 'any' to be able to link with both old and new libraries.
25 * Newer toolchains are capable of automatically generating this, but we want
26 * to work with older toolchains as well. Therefore, we define the contents of
27 * this section here (under different names), and then genvdso will patch
28 * it to have the correct name and type.
30 * We base the .MIPS.abiflags section on preprocessor definitions rather than
31 * CONFIG_* because we need to match the particular ABI we are building the
34 * See https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
35 * for the .MIPS.abiflags section description.
38 .section .mips_abiflags, "a"
41 .hword 0 /* version */
42 .byte __mips /* isa_level */
49 .byte 2 /* AFL_REG_64 */
51 .byte 1 /* AFL_REG_32 */
55 #if (MIPS_ISA_REV >= 6) || defined(__mips64)
56 .byte 2 /* AFL_REG_64 */
58 .byte 1 /* AFL_REG_32 */
61 .byte 0 /* cpr2_size (AFL_REG_NONE) */
62 .byte 0 /* fp_abi (Val_GNU_MIPS_ABI_FP_ANY) */