* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / asm-m68k / elf.h
blob8799724e65fe8121360d55f79703a4a1d3b78390
1 #ifndef __ASMm68k_ELF_H
2 #define __ASMm68k_ELF_H
4 /*
5 * ELF register definitions..
6 */
8 #include <asm/ptrace.h>
9 #include <asm/user.h>
11 typedef unsigned long elf_greg_t;
13 #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
14 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
16 typedef struct user_m68kfp_struct elf_fpregset_t;
19 * This is used to ensure we don't load something for the wrong architecture.
21 #define elf_check_arch(x) ((x) == EM_68K)
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_68K
30 /* For SVR4/m68k the function pointer to be registered with `atexit' is
31 passed in %a1. Although my copy of the ABI has no such statement, it
32 is actually used on ASV. */
33 #define ELF_PLAT_INIT(_r) _r->a1 = 0
35 #define USE_ELF_CORE_DUMP
36 #ifndef CONFIG_SUN3
37 #define ELF_EXEC_PAGESIZE 4096
38 #else
39 #define ELF_EXEC_PAGESIZE 8192
40 #endif
42 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
43 use of this is to invoke "./ld.so someprog" to test out a new version of
44 the loader. We need to make sure that it is out of the way of the program
45 that it will "exec", and that there is sufficient room for the brk. */
47 #ifndef CONFIG_SUN3
48 #define ELF_ET_DYN_BASE 0xD0000000UL
49 #else
50 #define ELF_ET_DYN_BASE 0x0D800000UL
51 #endif
53 #define ELF_CORE_COPY_REGS(pr_reg, regs) \
54 /* Bleech. */ \
55 pr_reg[0] = regs->d1; \
56 pr_reg[1] = regs->d2; \
57 pr_reg[2] = regs->d3; \
58 pr_reg[3] = regs->d4; \
59 pr_reg[4] = regs->d5; \
60 pr_reg[7] = regs->a0; \
61 pr_reg[8] = regs->a1; \
62 pr_reg[9] = regs->a2; \
63 pr_reg[14] = regs->d0; \
64 pr_reg[15] = rdusp(); \
65 pr_reg[16] = regs->orig_d0; \
66 pr_reg[17] = regs->sr; \
67 pr_reg[18] = regs->pc; \
68 pr_reg[19] = (regs->format << 12) | regs->vector; \
69 { \
70 struct switch_stack *sw = ((struct switch_stack *)regs) - 1; \
71 pr_reg[5] = sw->d6; \
72 pr_reg[6] = sw->d7; \
73 pr_reg[10] = sw->a3; \
74 pr_reg[11] = sw->a4; \
75 pr_reg[12] = sw->a5; \
76 pr_reg[13] = sw->a6; \
79 /* This yields a mask that user programs can use to figure out what
80 instruction set this cpu supports. */
82 #define ELF_HWCAP (0)
84 /* This yields a string that ld.so will use to load implementation
85 specific libraries for optimization. This is more specific in
86 intent than poking at uname or /proc/cpuinfo. */
88 #define ELF_PLATFORM (NULL)
90 #ifdef __KERNEL__
91 #define SET_PERSONALITY(ex, ibcs2) \
92 current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
93 #endif
95 #endif