1#ifndef _ASM_IA64_ELF_H 2#define _ASM_IA64_ELF_H 3 4/* 5 * ELF archtecture specific definitions. 6 * 7 * Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co 8 * David Mosberger-Tang <davidm@hpl.hp.com> 9 */ 10 11#include <asm/fpu.h> 12#include <asm/page.h> 13 14/* 15 * This is used to ensure we don't load something for the wrong architecture. 16 */ 17#define elf_check_arch(x) ((x)->e_machine == EM_IA_64) 18 19/* 20 * These are used to set parameters in the core dumps. 21 */ 22#define ELF_CLASS ELFCLASS64 23#define ELF_DATA ELFDATA2LSB 24#define ELF_ARCH EM_IA_64 25 26#define USE_ELF_CORE_DUMP 27 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? */ 31 32/* always align to 64KB to allow for future page sizes of up to 64KB: */ 33#define ELF_EXEC_PAGESIZE PAGE_SIZE 34 35/* 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. 41 */ 42#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x800000000) 43 44 45/* 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 49 * talk to him... 50 */ 51extern void ia64_init_addr_space (void); 52#define ELF_PLAT_INIT(_r) ia64_init_addr_space() 53 54/* ELF register definitions. This is needed for core dump support. */ 55 56/* 57 * elf_gregset_t contains the application-level state in the following order: 58 * r0-r31 59 * NaT bits (for r0-r31; bit N == 1 iff rN is a NaT) 60 * predicate registers (p0-p63) 61 * b0-b7 62 * ip cfm psr 63 * ar.rsc ar.bsp ar.bspstore ar.rnat 64 * ar.ccv ar.unat ar.fpsr ar.pfs ar.lc ar.ec 65 */ 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... */ 68 69typedef unsigned long elf_greg_t; 70typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 71 72typedef struct ia64_fpreg elf_fpreg_t; 73typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 74 75struct pt_regs; /* forward declaration... */ 76extern 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); 78 79/* This macro yields a bitmask that programs can use to figure out 80 what instruction set this CPU supports. */ 81#define ELF_HWCAP 0 82 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 87 88#ifdef __KERNEL__ 89struct elf64_hdr; 90extern void ia64_set_personality (struct elf64_hdr *elf_ex, int ibcs2_interpreter); 91#define SET_PERSONALITY(ex, ibcs2) ia64_set_personality(&(ex), ibcs2) 92#endif 93 94#endif /* _ASM_IA64_ELF_H */ 95