Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ASMCRIS_ELF_H |
| 2 | #define __ASMCRIS_ELF_H |
| 3 | |
| 4 | /* |
| 5 | * ELF register definitions.. |
| 6 | */ |
| 7 | |
| 8 | #include <asm/arch/elf.h> |
| 9 | #include <asm/user.h> |
| 10 | |
| 11 | typedef unsigned long elf_greg_t; |
| 12 | |
| 13 | /* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is |
| 14 | thus exposed to user-space. */ |
| 15 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) |
| 16 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
| 17 | |
| 18 | /* A placeholder; CRIS does not have any fp regs. */ |
| 19 | typedef unsigned long elf_fpregset_t; |
| 20 | |
| 21 | /* |
| 22 | * This is used to ensure we don't load something for the wrong architecture. |
| 23 | */ |
| 24 | #define elf_check_arch(x) ( (x)->e_machine == EM_CRIS ) |
| 25 | |
| 26 | /* |
| 27 | * These are used to set parameters in the core dumps. |
| 28 | */ |
| 29 | #define ELF_CLASS ELFCLASS32 |
| 30 | #define ELF_DATA ELFDATA2LSB; |
| 31 | #define ELF_ARCH EM_CRIS |
| 32 | |
| 33 | #define USE_ELF_CORE_DUMP |
| 34 | |
| 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 (2 * TASK_SIZE / 3) |
| 43 | |
| 44 | /* This yields a mask that user programs can use to figure out what |
| 45 | instruction set this CPU supports. This could be done in user space, |
| 46 | but it's not easy, and we've already done it here. */ |
| 47 | |
| 48 | #define ELF_HWCAP (0) |
| 49 | |
| 50 | /* This yields a string that ld.so will use to load implementation |
| 51 | specific libraries for optimization. This is more specific in |
| 52 | intent than poking at uname or /proc/cpuinfo. |
| 53 | */ |
| 54 | |
| 55 | #define ELF_PLATFORM (NULL) |
| 56 | |
| 57 | #ifdef __KERNEL__ |
| 58 | #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) |
| 59 | #endif |
| 60 | |
| 61 | #endif |