5 * ELF register definitions..
8 #include <linux/config.h>
9 #include <asm/ptrace.h>
11 #include <asm/byteorder.h>
13 typedef unsigned long elf_greg_t
;
15 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
16 typedef elf_greg_t elf_gregset_t
[ELF_NGREG
];
19 typedef double elf_fpreg_t
;
20 typedef elf_fpreg_t elf_fpregset_t
[ELF_NFPREG
];
21 #else /* SH 3 has no floating point regs */
22 typedef struct { void *null
; } elf_fpregset_t
;
26 * This is used to ensure we don't load something for the wrong architecture.
28 #define elf_check_arch(x) ( (x) == EM_SH )
31 * These are used to set parameters in the core dumps.
33 #define ELF_CLASS ELFCLASS32
34 #ifdef __LITTLE_ENDIAN
35 #define ELF_DATA ELFDATA2LSB
37 #define ELF_DATA ELFDATA2MSB
39 #define ELF_ARCH EM_SH
41 #define USE_ELF_CORE_DUMP
42 #define ELF_EXEC_PAGESIZE 4096
44 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
45 use of this is to invoke "./ld.so someprog" to test out a new version of
46 the loader. We need to make sure that it is out of the way of the program
47 that it will "exec", and that there is sufficient room for the brk. */
49 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
52 #define ELF_CORE_COPY_REGS(_dest,_regs) \
53 memcpy((char *) &_dest, (char *) _regs, \
54 sizeof(struct pt_regs));
56 /* This yields a mask that user programs can use to figure out what
57 instruction set this CPU supports. This could be done in user space,
58 but it's not easy, and we've already done it here. */
62 /* This yields a string that ld.so will use to load implementation
63 specific libraries for optimization. This is more specific in
64 intent than poking at uname or /proc/cpuinfo.
66 For the moment, we have only optimizations for the Intel generations,
67 but that could change... */
69 #define ELF_PLATFORM (NULL)
72 #define SET_PERSONALITY(ex, ibcs2) \
73 current->personality = PER_LINUX_32BIT
76 #endif /* __ASM_SH_ELF_H */