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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [include/] [asm-or32/] [elf.h] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 xianfeng
#ifndef _OR32_ELF_H
2
#define _OR32_ELF_H
3
 
4
/*
5
 * ELF register definitions..
6
 */
7
#include <asm/types.h>
8
#include <asm/ptrace.h>
9
 
10
typedef unsigned long elf_greg_t;
11
 
12
/* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is
13
   thus exposed to user-space. */
14
#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
15
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
16
 
17
/* A placeholder; OR32 does not have fp support yes, so no fp regs for now.  */
18
typedef unsigned long elf_fpregset_t;
19
 
20
/* This should be moved to include/linux/elf.h */
21
#define EM_OR32         0x8472
22
#define EM_OPENRISC     92     /* OpenRISC 32-bit embedded processor */
23
 
24
/*
25
 * These are used to set parameters in the core dumps.
26
 */
27
#define ELF_ARCH        EM_OR32
28
#define ELF_CLASS       ELFCLASS32
29
#define ELF_DATA        ELFDATA2MSB
30
 
31
#ifdef __KERNEL__
32
 
33
/*
34
 * This is used to ensure we don't load something for the wrong architecture.
35
 */
36
 
37
#define elf_check_arch(x) \
38
       (((x)->e_machine == EM_OR32) || ((x)->e_machine == EM_OPENRISC))
39
 
40
/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
41
   use of this is to invoke "./ld.so someprog" to test out a new version of
42
   the loader.  We need to make sure that it is out of the way of the program
43
   that it will "exec", and that there is sufficient room for the brk.  */
44
 
45
#define ELF_ET_DYN_BASE         (0x08000000)
46
 
47
#define USE_ELF_CORE_DUMP
48
#define ELF_EXEC_PAGESIZE       8192
49
 
50
#define ELF_CORE_COPY_REGS(gregs, regs) \
51
        memcpy(gregs, regs, \
52
               sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
53
               sizeof(struct pt_regs): sizeof(elf_gregset_t));
54
 
55
 
56
/* This yields a mask that user programs can use to figure out what
57
   instruction set this cpu supports.  This could be done in userspace,
58
   but it's not easy, and we've already done it here.  */
59
 
60
#define ELF_HWCAP       (0)
61
 
62
/* This yields a string that ld.so will use to load implementation
63
   specific libraries for optimization.  This is more specific in
64
   intent than poking at uname or /proc/cpuinfo.
65
 
66
   For the moment, we have only optimizations for the Intel generations,
67
   but that could change... */
68
 
69
#define ELF_PLATFORM    (NULL)
70
 
71
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
72
 
73
#endif /* __KERNEL__ */
74
#endif

powered by: WebSVN 2.1.0

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