1 #ifndef _ASM_IA64_ELF_H
2 #define _ASM_IA64_ELF_H
5 * ELF archtecture specific definitions.
7 * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co
8 * David Mosberger-Tang <davidm@hpl.hp.com>
15 * This is used to ensure we don't load something for the wrong architecture.
17 #define elf_check_arch(x) ((x)->e_machine == EM_IA_64)
20 * These are used to set parameters in the core dumps.
22 #define ELF_CLASS ELFCLASS64
23 #define ELF_DATA ELFDATA2LSB
24 #define ELF_ARCH EM_IA_64
26 #define USE_ELF_CORE_DUMP
28 /* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are
29 interpreted as follows by Linux: */
30 #define EF_IA_64_LINUX_EXECUTABLE_STACK 0x1 /* is stack (& heap) executable by default? */
32 /* always align to 64KB to allow for future page sizes of up to 64KB: */
33 #define ELF_EXEC_PAGESIZE PAGE_SIZE
36 * This is the location that an ET_DYN program is loaded if exec'ed.
37 * Typical use of this is to invoke "./ld.so someprog" to test out a
38 * new version of the loader. We need to make sure that it is out of
39 * the way of the program that it will "exec", and that there is
40 * sufficient room for the brk.
42 #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000)
46 * We use (abuse?) this macro to insert the (empty) vm_area that is
47 * used to map the register backing store. I don't see any better
48 * place to do this, but we should discuss this with Linus once we can
51 extern void ia64_init_addr_space (void);
52 #define ELF_PLAT_INIT(_r) ia64_init_addr_space()
54 /* ELF register definitions. This is needed for core dump support. */
57 * elf_gregset_t contains the application-level state in the following order:
59 * NaT bits (for r0-r31; bit N == 1 iff rN is a NaT)
60 * predicate registers (p0-p63)
63 * ar.rsc ar.bsp ar.bspstore ar.rnat
64 * ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec
66 #define ELF_NGREG 128 /* we really need just 72 but let's leave some headroom... */
67 #define ELF_NFPREG 128 /* f0 and f1 could be omitted, but so what... */
69 typedef unsigned long elf_greg_t;
70 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
72 typedef struct ia64_fpreg elf_fpreg_t;
73 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
75 struct pt_regs; /* forward declaration... */
76 extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
77 #define ELF_CORE_COPY_REGS(_dest,_regs) ia64_elf_core_copy_regs(_regs, _dest);
79 /* This macro yields a bitmask that programs can use to figure out
80 what instruction set this CPU supports. */
83 /* This macro yields a string that ld.so will use to load
84 implementation specific libraries for optimization. Not terribly
85 relevant until we have real hardware to play with... */
86 #define ELF_PLATFORM 0
90 extern void ia64_set_personality (struct elf64_hdr *elf_ex, int ibcs2_interpreter);
91 #define SET_PERSONALITY(ex, ibcs2) ia64_set_personality(&(ex), ibcs2)
94 #endif /* _ASM_IA64_ELF_H */