Import 2.3.16
[davej-history.git] / include / asm-sh / elf.h
blob39d412744ed683483022e60356309d40865259b9
1 #ifndef __ASM_SH_ELF_H
2 #define __ASM_SH_ELF_H
4 /*
5 * ELF register definitions..
6 */
8 #include <asm/ptrace.h>
9 #include <asm/user.h>
10 #include <asm/byteorder.h>
12 typedef unsigned long elf_greg_t;
14 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
15 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
17 #ifdef CONFIG_CPU_SH4
18 typedef double elf_fpreg_t;
19 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
20 #else /* SH 3 has no floating point regs */
21 typedef struct { void *null; } elf_fpregset_t;
22 #endif
25 * This is used to ensure we don't load something for the wrong architecture.
27 #define elf_check_arch(x) ( (x) == EM_SH )
30 * These are used to set parameters in the core dumps.
32 #define ELF_CLASS ELFCLASS32
33 #ifdef __LITTLE_ENDIAN
34 #define ELF_DATA ELFDATA2LSB
35 #else
36 #define ELF_DATA ELFDATA2MSB
37 #endif
38 #define ELF_ARCH EM_SH
40 #define USE_ELF_CORE_DUMP
41 #define ELF_EXEC_PAGESIZE 4096
43 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
44 use of this is to invoke "./ld.so someprog" to test out a new version of
45 the loader. We need to make sure that it is out of the way of the program
46 that it will "exec", and that there is sufficient room for the brk. */
48 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
51 #define ELF_CORE_COPY_REGS(_dest,_regs) \
52 memcpy((char *) &_dest, (char *) _regs, \
53 sizeof(struct pt_regs));
55 /* This yields a mask that user programs can use to figure out what
56 instruction set this CPU supports. This could be done in user space,
57 but it's not easy, and we've already done it here. */
59 #define ELF_HWCAP (0)
61 /* This yields a string that ld.so will use to load implementation
62 specific libraries for optimization. This is more specific in
63 intent than poking at uname or /proc/cpuinfo.
65 For the moment, we have only optimizations for the Intel generations,
66 but that could change... */
68 #define ELF_PLATFORM (NULL)
70 #ifdef __KERNEL__
71 #define SET_PERSONALITY(ex, ibcs2) \
72 current->personality = PER_LINUX_32BIT
73 #endif
75 #endif /* __ASM_SH_ELF_H */