master
h 48 lines 1.28 KB
Raw
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License version 2 as
4 * published by the Free Software Foundation, or (at your option) any
5 * later version. See the COPYING file in the top-level directory.
6 */
7
8 #ifndef MIPS64_TARGET_ELF_H
9 #define MIPS64_TARGET_ELF_H
10
11 #include "target_ptrace.h"
12
13 #define ELF_CLASS ELFCLASS64
14 #define ELF_MACHINE EM_MIPS
15 #define EXSTACK_DEFAULT true
16
17 #ifdef TARGET_ABI_MIPSN32
18 #define elf_check_abi(x) ((x) & EF_MIPS_ABI2)
19 #else
20 #define elf_check_abi(x) (!((x) & EF_MIPS_ABI2))
21 #endif
22
23 #define HAVE_ELF_HWCAP 1
24 #define HAVE_ELF_BASE_PLATFORM 1
25 #define HAVE_ELF_CORE_DUMP 1
26
27 /* See linux kernel: arch/mips/include/asm/elf.h. */
28 typedef struct target_elf_gregset_t {
29 union {
30 target_ulong reserved[45];
31 struct target_pt_regs pt;
32 };
33 } target_elf_gregset_t;
34
35 #define HAVE_ELF_CORE_FPREGS 1
36
37 /*
38 * Matches the kernel's elf_fpregset_t (ELF_NFPREG = 33):
39 * fpr[0..31] hold f0-f31; fcsr occupies the low 32 bits of slot 32.
40 * pad rounds the struct to 33 × 8 bytes = 264 bytes.
41 */
42 typedef struct target_elf_fpregset_t {
43 uint64_t fpr[32];
44 uint32_t fcsr;
45 uint32_t pad;
46 } target_elf_fpregset_t;
47
48 #endif