more debug output
[linux-2.4.git] / include / asm-s390x / elf.h
1 /*
2  *  include/asm-s390/elf.h
3  *
4  *  S390 version
5  *
6  *  Derived from "include/asm-i386/elf.h"
7  */
8
9 #ifndef __ASMS390_ELF_H
10 #define __ASMS390_ELF_H
11
12 /*
13  * ELF register definitions..
14  */
15
16 #include <asm/ptrace.h>
17 #include <asm/user.h>
18
19
20 typedef s390_fp_regs elf_fpregset_t;
21 typedef s390_regs elf_gregset_t;
22
23 /*
24  * These are used to set parameters in the core dumps.
25  */
26 #define ELF_CLASS       ELFCLASS64
27 #define ELF_DATA        ELFDATA2MSB
28 #define ELF_ARCH        EM_S390
29
30 /*
31  * This is used to ensure we don't load something for the wrong architecture.
32  */
33 #define elf_check_arch(x) \
34         (((x)->e_machine == EM_S390 || (x)->e_machine == EM_S390_OLD) \
35          && (x)->e_ident[EI_CLASS] == ELF_CLASS)
36
37 /* For SVR4/S390 the function pointer to be registered with `atexit` is
38    passed in R14. */
39 #define ELF_PLAT_INIT(_r, load_addr) \
40         do { \
41         _r->gprs[14] = 0; \
42         current->thread.flags = 0; \
43         } while(0)
44
45 #define USE_ELF_CORE_DUMP
46 #define ELF_EXEC_PAGESIZE       4096
47
48 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
49    use of this is to invoke "./ld.so someprog" to test out a new version of
50    the loader.  We need to make sure that it is out of the way of the program
51    that it will "exec", and that there is sufficient room for the brk.  */
52
53 #define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
54
55 /* Wow, the "main" arch needs arch dependent functions too.. :) */
56
57 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
58    now struct_user_regs, they are different) */
59
60 #define ELF_CORE_COPY_REGS(pr_reg, regs)        \
61         memcpy(&pr_reg,regs,sizeof(elf_gregset_t)); \
62
63
64
65 /* This yields a mask that user programs can use to figure out what
66    instruction set this CPU supports. */
67
68 #define ELF_HWCAP (0)
69
70 /* This yields a string that ld.so will use to load implementation
71    specific libraries for optimization.  This is more specific in
72    intent than poking at uname or /proc/cpuinfo.
73
74    For the moment, we have only optimizations for the Intel generations,
75    but that could change... */
76
77 #define ELF_PLATFORM (NULL)
78
79 #ifdef __KERNEL__
80 #define SET_PERSONALITY(ex, ibcs2)                      \
81 do {                                                    \
82         if (ibcs2)                                      \
83                 set_personality(PER_SVR4);              \
84         else if (current->personality != PER_LINUX32)   \
85                 set_personality(PER_LINUX);             \
86 } while (0)
87 #endif
88
89 #endif