Import 2.3.13pre6
[davej-history.git] / include / asm-ppc / elf.h
blob002736abf1ce57af068daf3a25feffb7f457ab2d
1 #ifndef __PPC_ELF_H
2 #define __PPC_ELF_H
4 /*
5 * ELF register definitions..
6 */
7 #include <asm/ptrace.h>
9 #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */
10 #define ELF_NFPREG 33 /* includes fpscr */
13 * This is used to ensure we don't load something for the wrong architecture.
15 #define elf_check_arch(x) ((x) == EM_PPC)
18 * These are used to set parameters in the core dumps.
20 #define ELF_ARCH EM_PPC
21 #define ELF_CLASS ELFCLASS32
22 #define ELF_DATA ELFDATA2MSB
24 #define USE_ELF_CORE_DUMP
25 #define ELF_EXEC_PAGESIZE 4096
27 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
28 use of this is to invoke "./ld.so someprog" to test out a new version of
29 the loader. We need to make sure that it is out of the way of the program
30 that it will "exec", and that there is sufficient room for the brk. */
32 #define ELF_ET_DYN_BASE (0x08000000)
34 typedef unsigned long elf_greg_t;
35 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
37 typedef double elf_fpreg_t;
38 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
40 #define ELF_CORE_COPY_REGS(gregs, regs) \
41 memcpy(gregs, regs, \
42 sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
43 sizeof(struct pt_regs): sizeof(elf_gregset_t));
46 /* This yields a mask that user programs can use to figure out what
47 instruction set this cpu supports. This could be done in userspace,
48 but it's not easy, and we've already done it here. */
50 #define ELF_HWCAP (0)
52 /* This yields a string that ld.so will use to load implementation
53 specific libraries for optimization. This is more specific in
54 intent than poking at uname or /proc/cpuinfo.
56 For the moment, we have only optimizations for the Intel generations,
57 but that could change... */
59 #define ELF_PLATFORM (NULL)
61 #ifdef __KERNEL__
62 #define SET_PERSONALITY(ex, ibcs2) \
63 current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
64 #endif
66 #endif