5 * ELF register definitions..
8 #include <asm/ptrace.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 typedef struct user_fpu_struct elf_fpregset_t
;
20 * This is used to ensure we don't load something for the wrong architecture.
22 #define elf_check_arch(x) ( (x)->e_machine == EM_SH )
25 * These are used to set parameters in the core dumps.
27 #define ELF_CLASS ELFCLASS32
28 #ifdef __LITTLE_ENDIAN__
29 #define ELF_DATA ELFDATA2LSB
31 #define ELF_DATA ELFDATA2MSB
33 #define ELF_ARCH EM_SH
35 #define USE_ELF_CORE_DUMP
36 #define ELF_EXEC_PAGESIZE 4096
38 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
39 use of this is to invoke "./ld.so someprog" to test out a new version of
40 the loader. We need to make sure that it is out of the way of the program
41 that it will "exec", and that there is sufficient room for the brk. */
43 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
46 #define ELF_CORE_COPY_REGS(_dest,_regs) \
47 memcpy((char *) &_dest, (char *) _regs, \
48 sizeof(struct pt_regs));
50 /* This yields a mask that user programs can use to figure out what
51 instruction set this CPU supports. This could be done in user space,
52 but it's not easy, and we've already done it here. */
56 /* This yields a string that ld.so will use to load implementation
57 specific libraries for optimization. This is more specific in
58 intent than poking at uname or /proc/cpuinfo.
60 For the moment, we have only optimizations for the Intel generations,
61 but that could change... */
63 #define ELF_PLATFORM (NULL)
65 #define ELF_PLAT_INIT(_r) \
66 do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \
67 _r->regs[4]=0; _r->regs[5]=0; _r->regs[6]=0; _r->regs[7]=0; \
68 _r->regs[8]=0; _r->regs[9]=0; _r->regs[10]=0; _r->regs[11]=0; \
69 _r->regs[12]=0; _r->regs[13]=0; _r->regs[14]=0; \
70 _r->sr = SR_FD; } while (0)
73 #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT)
76 #endif /* __ASM_SH_ELF_H */