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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-or32/] [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 _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 1603 nogj
#define EM_OPENRISC      92     /* OpenRISC 32-bit embedded processor */
23 1276 phoenix
/*
24
 * These are used to set parameters in the core dumps.
25
 */
26
#define ELF_ARCH        EM_OR32
27
#define ELF_CLASS       ELFCLASS32
28
#define ELF_DATA        ELFDATA2MSB
29
 
30
#ifdef __KERNEL__
31
 
32
/*
33
 * This is used to ensure we don't load something for the wrong architecture.
34
 */
35
 
36 1603 nogj
#define elf_check_arch(x) \
37
        (((x)->e_machine == EM_OR32) || ((x)->e_machine == EM_OPENRISC))
38 1276 phoenix
 
39
/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
40
   use of this is to invoke "./ld.so someprog" to test out a new version of
41
   the loader.  We need to make sure that it is out of the way of the program
42
   that it will "exec", and that there is sufficient room for the brk.  */
43
 
44
#define ELF_ET_DYN_BASE         (0x08000000)
45
 
46
#define USE_ELF_CORE_DUMP
47
#define ELF_EXEC_PAGESIZE       8192
48
 
49
#define ELF_CORE_COPY_REGS(gregs, regs) \
50
        memcpy(gregs, regs, \
51
               sizeof(struct pt_regs) < sizeof(elf_gregset_t)? \
52
               sizeof(struct pt_regs): sizeof(elf_gregset_t));
53
 
54
 
55
/* This yields a mask that user programs can use to figure out what
56
   instruction set this cpu supports.  This could be done in userspace,
57
   but it's not easy, and we've already done it here.  */
58
 
59
#define ELF_HWCAP       (0)
60
 
61
/* This yields a string that ld.so will use to load implementation
62
   specific libraries for optimization.  This is more specific in
63
   intent than poking at uname or /proc/cpuinfo.
64
 
65
   For the moment, we have only optimizations for the Intel generations,
66
   but that could change... */
67
 
68
#define ELF_PLATFORM    (NULL)
69
 
70
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
71
 
72
#endif /* __KERNEL__ */
73
#endif

powered by: WebSVN 2.1.0

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