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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _ASM_OR32_ELF_H
2
#define _ASM_OR32_ELF_H
3
 
4
/*
5
 * ELF register definitions..
6
 */
7
 
8
#include <asm/ptrace.h>
9
 
10
typedef unsigned long elf_greg_t;
11
 
12
#define ELF_NGREG 33 /* pc/sr/sp/r2-r31 */
13
 
14
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
15
typedef struct user_or32fp_struct elf_fpregset_t;
16
 
17
/* Define the ELF target machines */
18
#define EM_OR32 80      /* OpenRISC 1000 */
19
 
20
/*
21
 * This is used to ensure we don't load something for the wrong architecture.
22
 */
23
#define elf_check_arch(x) ((x) == EM_OR32)
24
 
25
/* Max number of setion in one elf file */
26
#define ELF_SECTION_NB 20
27
/*
28
 * These are used to set parameters in the core dumps.
29
 */
30
#define ELF_CLASS       ELFCLASS32
31
#define ELF_DATA        ELFDATA2MSB;
32
#define ELF_ARCH        EM_OR32
33
 
34
#undef USE_ELF_CORE_DUMP
35
#define ELF_EXEC_PAGESIZE       4096
36
 
37
enum reloc_type
38
{
39
        R_OR32_NONE = 0,
40
        R_OR32_32,
41
        R_OR32_16,
42
        R_OR32_8,
43
        R_OR32_CONST,
44
        R_OR32_CONSTH,
45
        R_OR32_JUMPTARG,
46
        R_OR32_max
47
};
48
 
49
#define ELF_CORE_COPY_REGS(pr_reg, regs)                                \
50
        /* Bleech. */                                                   \
51
        pr_reg[0] = regs->pc;                                            \
52
        pr_reg[1] = regs->sr;                                           \
53
        pr_reg[2] = regs->sp;                                           \
54
        pr_reg[3] = regs->gprs[0];                                       \
55
        pr_reg[4] = regs->gprs[1];                                      \
56
        pr_reg[5] = regs->gprs[2];                                      \
57
        pr_reg[6] = regs->gprs[3];                                      \
58
        pr_reg[7] = regs->gprs[4];                                      \
59
        pr_reg[8] = regs->gprs[5];                                      \
60
        pr_reg[9] = regs->gprs[6];                                      \
61
        pr_reg[10] = regs->gprs[7];                                     \
62
        pr_reg[11] = regs->gprs[8];                                     \
63
        pr_reg[12] = regs->gprs[9];                                     \
64
        pr_reg[13] = regs->gprs[10];                                    \
65
        pr_reg[14] = regs->gprs[11];                                    \
66
        pr_reg[15] = regs->gprs[12];                                    \
67
        pr_reg[16] = regs->gprs[13];                                    \
68
        pr_reg[17] = regs->gprs[14];                                    \
69
        pr_reg[18] = regs->gprs[15];                                    \
70
        pr_reg[19] = regs->gprs[16];                                    \
71
        pr_reg[20] = regs->gprs[17];                                    \
72
        pr_reg[21] = regs->gprs[18];                                    \
73
        pr_reg[22] = regs->gprs[19];                                    \
74
        pr_reg[23] = regs->gprs[20];                                    \
75
        pr_reg[24] = regs->gprs[21];                                    \
76
        pr_reg[25] = regs->gprs[22];                                    \
77
        pr_reg[26] = regs->gprs[23];                                    \
78
        pr_reg[27] = regs->gprs[24];                                    \
79
        pr_reg[28] = regs->gprs[25];                                    \
80
        pr_reg[29] = regs->gprs[26];                                    \
81
        pr_reg[30] = regs->gprs[27];                                    \
82
        pr_reg[31] = regs->gprs[28];                                    \
83
        pr_reg[32] = regs->gprs[29];                                    \
84
        }
85
 
86
#endif

powered by: WebSVN 2.1.0

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