]> git.ozlabs.org Git - yaboot.git/blob - include/asm/elf.h
Prepare 1.3.8-rc4
[yaboot.git] / include / asm / elf.h
1 #ifndef __PPC_ELF_H
2 #define __PPC_ELF_H
3
4 #define ELF_NGREG       48      /* includes nip, msr, lr, etc. */
5 #define ELF_NFPREG      33      /* includes fpscr */
6
7 /*
8  * This is used to ensure we don't load something for the wrong architecture.
9  */
10 #define elf_check_arch(x) ((x) == EM_PPC)
11
12 /*
13  * These are used to set parameters in the core dumps.
14  */
15 #define ELF_ARCH        EM_PPC
16 #define ELF_CLASS       ELFCLASS32
17 #define ELF_DATA        ELFDATA2MSB
18
19 #define USE_ELF_CORE_DUMP
20 #define ELF_EXEC_PAGESIZE       4096
21
22 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
23    use of this is to invoke "./ld.so someprog" to test out a new version of
24    the loader.  We need to make sure that it is out of the way of the program
25    that it will "exec", and that there is sufficient room for the brk.  */
26
27 #define ELF_ET_DYN_BASE         (0x08000000)
28
29 typedef unsigned long elf_greg_t;
30 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
31
32 typedef double elf_fpreg_t;
33 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
34
35 #define ELF_CORE_COPY_REGS(gregs, regs) \
36         memcpy(gregs, regs, \
37                sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
38                sizeof(struct pt_regs): sizeof(elf_gregset_t));
39
40
41 /* This yields a mask that user programs can use to figure out what
42    instruction set this cpu supports.  This could be done in userspace,
43    but it's not easy, and we've already done it here.  */
44
45 #define ELF_HWCAP       (0)
46
47 /* This yields a string that ld.so will use to load implementation
48    specific libraries for optimization.  This is more specific in
49    intent than poking at uname or /proc/cpuinfo.
50
51    For the moment, we have only optimizations for the Intel generations,
52    but that could change... */
53
54 #define ELF_PLATFORM    (NULL)
55
56
57 #endif