2 * include/asm-s390/elf.h
6 * Derived from "include/asm-i386/elf.h"
9 #ifndef __ASMS390_ELF_H
10 #define __ASMS390_ELF_H
13 * ELF register definitions..
16 #include <asm/ptrace.h>
20 typedef s390_fp_regs elf_fpregset_t;
21 typedef s390_regs elf_gregset_t;
24 * These are used to set parameters in the core dumps.
26 #define ELF_CLASS ELFCLASS32
27 #define ELF_DATA ELFDATA2MSB
28 #define ELF_ARCH EM_S390
31 * This is used to ensure we don't load something for the wrong architecture.
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)
37 /* For SVR4/S390 the function pointer to be registered with `atexit` is
39 #define ELF_PLAT_INIT(_r) \
42 #define USE_ELF_CORE_DUMP
43 #define ELF_EXEC_PAGESIZE 4096
45 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
46 use of this is to invoke "./ld.so someprog" to test out a new version of
47 the loader. We need to make sure that it is out of the way of the program
48 that it will "exec", and that there is sufficient room for the brk. */
50 #define ELF_ET_DYN_BASE ((TASK_SIZE & 0x80000000) \
54 /* Wow, the "main" arch needs arch dependent functions too.. :) */
56 /* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
57 now struct_user_regs, they are different) */
59 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
60 memcpy(&pr_reg,regs,sizeof(elf_gregset_t)); \
64 /* This yields a mask that user programs can use to figure out what
65 instruction set this CPU supports. */
69 /* This yields a string that ld.so will use to load implementation
70 specific libraries for optimization. This is more specific in
71 intent than poking at uname or /proc/cpuinfo.
73 For the moment, we have only optimizations for the Intel generations,
74 but that could change... */
76 #define ELF_PLATFORM (NULL)
79 #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)