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

Subversion Repositories or1k

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

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

Line No. Rev Author Line
1 1275 phoenix
#ifndef __ASM_ALPHA_ELF_H
2
#define __ASM_ALPHA_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)->e_machine == 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
/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
38
   use of this is to invoke "./ld.so someprog" to test out a new version of
39
   the loader.  We need to make sure that it is out of the way of the program
40
   that it will "exec", and that there is sufficient room for the brk.  */
41
 
42
#define ELF_ET_DYN_BASE         (TASK_UNMAPPED_BASE + 0x1000000)
43
 
44
/* $0 is set by ld.so to a pointer to a function which might be
45
   registered using atexit.  This provides a mean for the dynamic
46
   linker to call DT_FINI functions for shared libraries that have
47
   been loaded before the code runs.
48
 
49
   So that we can use the same startup file with static executables,
50
   we start programs with a value of 0 to indicate that there is no
51
   such function.  */
52
 
53
#define ELF_PLAT_INIT(_r, load_addr)    _r->r0 = 0
54
 
55
#ifdef __KERNEL__
56
/* The registers are layed out in pt_regs for PAL and syscall
57
   convenience.  Re-order them for the linear elf_gregset_t.  */
58
 
59
extern void dump_elf_thread(elf_greg_t *, struct pt_regs *,
60
                            struct task_struct *);
61
#define ELF_CORE_COPY_REGS(DEST, REGS) \
62
        dump_elf_thread(DEST, REGS, current);
63
#endif /* __KERNEL__ */
64
 
65
/* This yields a mask that user programs can use to figure out what
66
   instruction set this CPU supports.  This is trivial on Alpha,
67
   but not so on other machines. */
68
 
69
#define ELF_HWCAP  (~amask(-1))
70
 
71
/* This yields a string that ld.so will use to load implementation
72
   specific libraries for optimization.  This is more specific in
73
   intent than poking at uname or /proc/cpuinfo.  */
74
 
75
#define ELF_PLATFORM                            \
76
({                                              \
77
        enum implver_enum i_ = implver();       \
78
        ( i_ == IMPLVER_EV4 ? "ev4"             \
79
        : i_ == IMPLVER_EV5                     \
80
          ? (amask(AMASK_BWX) ? "ev5" : "ev56") \
81
        : amask (AMASK_CIX) ? "ev6" : "ev67");  \
82
})
83
 
84
#ifdef __KERNEL__
85
#define SET_PERSONALITY(EX, IBCS2)                              \
86
        set_personality(((EX).e_flags & EF_ALPHA_32BIT)         \
87
           ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
88
#endif
89
 
90
#endif

powered by: WebSVN 2.1.0

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