| 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 MIPS_TARGET_ELF_H |
| 9 | #define MIPS_TARGET_ELF_H |
| 10 | |
| 11 | #include "target_ptrace.h" |
| 12 | |
| 13 | #define ELF_CLASS ELFCLASS32 |
| 14 | #define ELF_MACHINE EM_MIPS |
| 15 | #define EXSTACK_DEFAULT true |
| 16 | |
| 17 | #define HAVE_ELF_HWCAP 1 |
| 18 | #define HAVE_ELF_BASE_PLATFORM 1 |
| 19 | #define HAVE_ELF_CORE_DUMP 1 |
| 20 | |
| 21 | /* See linux kernel: arch/mips/include/asm/elf.h. */ |
| 22 | typedef struct target_elf_gregset_t { |
| 23 | union { |
| 24 | abi_ulong reserved[45]; |
| 25 | struct target_pt_regs pt; |
| 26 | }; |
| 27 | } target_elf_gregset_t; |
| 28 | |
| 29 | #define HAVE_ELF_CORE_FPREGS 1 |
| 30 | |
| 31 | /* |
| 32 | * Matches the kernel's elf_fpregset_t (ELF_NFPREG = 33): |
| 33 | * fpr[0..31] hold f0-f31; fcsr occupies the low 32 bits of slot 32. |
| 34 | * pad rounds the struct to 33 × 8 bytes = 264 bytes. |
| 35 | */ |
| 36 | typedef struct target_elf_fpregset_t { |
| 37 | uint64_t fpr[32]; |
| 38 | uint32_t fcsr; |
| 39 | uint32_t pad; |
| 40 | } target_elf_fpregset_t; |
| 41 | |
| 42 | #endif |