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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-alpha/] [elf.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1632 jcastillo
#ifndef __ASMaxp_ELF_H
2
#define __ASMaxp_ELF_H
3
 
4
/*
5
 * ELF register definitions..
6
 */
7
 
8
/*
9
 * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
10
 * I have no idea why that is so.  For now, we just leave it at 33
11
 * (32 general regs + processor status word).
12
 */
13
#define ELF_NGREG       33
14
#define ELF_NFPREG      32
15
 
16
typedef unsigned long elf_greg_t;
17
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
18
 
19
typedef double elf_fpreg_t;
20
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
21
 
22
/*
23
 * This is used to ensure we don't load something for the wrong architecture.
24
 */
25
#define elf_check_arch(x) ((x) == EM_ALPHA)
26
 
27
/*
28
 * These are used to set parameters in the core dumps.
29
 */
30
#define ELF_CLASS       ELFCLASS64
31
#define ELF_DATA        ELFDATA2LSB;
32
#define ELF_ARCH        EM_ALPHA
33
 
34
#define USE_ELF_CORE_DUMP
35
#define ELF_EXEC_PAGESIZE       8192
36
 
37
/* $0 is set by ld.so to a pointer to a function which might be
38
   registered using atexit.  This provides a mean for the dynamic
39
   linker to call DT_FINI functions for shared libraries that have
40
   been loaded before the code runs.
41
 
42
   So that we can use the same startup file with static executables,
43
   we start programs with a value of 0 to indicate that there is no
44
   such function.  */
45
 
46
#define ELF_PLAT_INIT(_r)       _r->r0 = 0
47
 
48
/* Use the same format as the OSF/1 procfs interface.  The register
49
   layout is sane.  However, since dump_thread() creates the funky
50
   layout that ECOFF coredumps want, we need to undo that layout here.
51
   Eventually, it would be nice if the ECOFF core-dump had to do the
52
   translation, then ELF_CORE_COPY_REGS() would become trivial and
53
   faster.  */
54
#define ELF_CORE_COPY_REGS(_dest,_regs)                         \
55
{                                                               \
56
        struct user _dump;                                      \
57
                                                                \
58
        dump_thread(_regs, &_dump);                             \
59
        _dest[ 0] = _dump.regs[EF_V0];                           \
60
        _dest[ 1] = _dump.regs[EF_T0];                          \
61
        _dest[ 2] = _dump.regs[EF_T1];                          \
62
        _dest[ 3] = _dump.regs[EF_T2];                          \
63
        _dest[ 4] = _dump.regs[EF_T3];                          \
64
        _dest[ 5] = _dump.regs[EF_T4];                          \
65
        _dest[ 6] = _dump.regs[EF_T5];                          \
66
        _dest[ 7] = _dump.regs[EF_T6];                          \
67
        _dest[ 8] = _dump.regs[EF_T7];                          \
68
        _dest[ 9] = _dump.regs[EF_S0];                          \
69
        _dest[10] = _dump.regs[EF_S1];                          \
70
        _dest[11] = _dump.regs[EF_S2];                          \
71
        _dest[12] = _dump.regs[EF_S3];                          \
72
        _dest[13] = _dump.regs[EF_S4];                          \
73
        _dest[14] = _dump.regs[EF_S5];                          \
74
        _dest[15] = _dump.regs[EF_S6];                          \
75
        _dest[16] = _dump.regs[EF_A0];                          \
76
        _dest[17] = _dump.regs[EF_A1];                          \
77
        _dest[18] = _dump.regs[EF_A2];                          \
78
        _dest[19] = _dump.regs[EF_A3];                          \
79
        _dest[20] = _dump.regs[EF_A4];                          \
80
        _dest[21] = _dump.regs[EF_A5];                          \
81
        _dest[22] = _dump.regs[EF_T8];                          \
82
        _dest[23] = _dump.regs[EF_T9];                          \
83
        _dest[24] = _dump.regs[EF_T10];                         \
84
        _dest[25] = _dump.regs[EF_T11];                         \
85
        _dest[26] = _dump.regs[EF_RA];                          \
86
        _dest[27] = _dump.regs[EF_T12];                         \
87
        _dest[28] = _dump.regs[EF_AT];                          \
88
        _dest[29] = _dump.regs[EF_GP];                          \
89
        _dest[30] = _dump.regs[EF_SP];                          \
90
        _dest[31] = _dump.regs[EF_PC];  /* store PC here */     \
91
        _dest[32] = _dump.regs[EF_PS];                          \
92
}
93
 
94
#endif

powered by: WebSVN 2.1.0

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