| 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 SH4_TARGET_ELF_H |
| 9 | #define SH4_TARGET_ELF_H |
| 10 | |
| 11 | #include "target_ptrace.h" |
| 12 | |
| 13 | #define ELF_CLASS ELFCLASS32 |
| 14 | #define ELF_MACHINE EM_SH |
| 15 | |
| 16 | #define HAVE_ELF_HWCAP 1 |
| 17 | #define HAVE_ELF_CORE_DUMP 1 |
| 18 | #define HAVE_VDSO_IMAGE_INFO 1 |
| 19 | |
| 20 | /* |
| 21 | * See linux kernel: arch/sh/include/asm/elf.h, where |
| 22 | * elf_gregset_t is mapped to struct pt_regs via sizeof. |
| 23 | */ |
| 24 | typedef struct target_elf_gregset_t { |
| 25 | struct target_pt_regs pt; |
| 26 | } target_elf_gregset_t; |
| 27 | |
| 28 | #define HAVE_ELF_CORE_FPREGS 1 |
| 29 | |
| 30 | /* |
| 31 | * Matches struct user_fpu_struct from arch/sh/include/asm/user.h. |
| 32 | */ |
| 33 | typedef struct target_elf_fpregset_t { |
| 34 | uint32_t fpregs[16]; |
| 35 | uint32_t xfpregs[16]; |
| 36 | uint32_t fpscr; |
| 37 | uint32_t fpul; |
| 38 | } target_elf_fpregset_t; |
| 39 | |
| 40 | #endif |