OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-m68k/] [elf.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.