1 #ifndef __ASMARM_ELF_H 2 #define __ASMARM_ELF_H 3 4 /* 5 * ELF register definitions.. 6 */ 7 8 #include <asm/ptrace.h> 9 #include <asm/user.h> 10 #include <asm/proc/elf.h> 11 #include <asm/procinfo.h> 12 13 typedef unsigned long elf_greg_t; 14 15 #define EM_ARM 40 16 #define EF_ARM_APCS26 0x08 17 18 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) 19 typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 20 21 typedef struct user_fp elf_fpregset_t; 22 23 /* 24 * This is used to ensure we don't load something for the wrong architecture. 25 */ 26 #define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) 27 28 /* 29 * These are used to set parameters in the core dumps. 30 */ 31 #define ELF_CLASS ELFCLASS32 32 #ifdef __ARMEB__ 33 #define ELF_DATA ELFDATA2MSB; 34 #else 35 #define ELF_DATA ELFDATA2LSB; 36 #endif 37 #define ELF_ARCH EM_ARM 38 39 #define USE_ELF_CORE_DUMP 40 41 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical 42 use of this is to invoke "./ld.so someprog" to test out a new version of 43 the loader. We need to make sure that it is out of the way of the program 44 that it will "exec", and that there is sufficient room for the brk. */ 45 46 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 47 48 /* When the program starts, a1 contains a pointer to a function to be 49 registered with atexit, as per the SVR4 ABI. A value of 0 means we 50 have no such handler. */ 51 #define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 52 53 /* This yields a mask that user programs can use to figure out what 54 instruction set this cpu supports. */ 55 56 #define ELF_HWCAP (elf_hwcap) 57 58 /* This yields a string that ld.so will use to load implementation 59 specific libraries for optimization. This is more specific in 60 intent than poking at uname or /proc/cpuinfo. */ 61 62 /* For now we just provide a fairly general string that describes the 63 processor family. This could be made more specific later if someone 64 implemented optimisations that require it. 26-bit CPUs give you 65 "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't 66 supported). 32-bit CPUs give you "v3[lb]" for anything based on an 67 ARM6 or ARM7 core and "armv4[lb]" for anything based on a StrongARM-1 68 core. */ 69 70 #define ELF_PLATFORM_SIZE 8 71 extern char elf_platform[]; 72 #define ELF_PLATFORM (elf_platform) 73 74 #endif 75