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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #include <asm/user.h> |
| 9 | |
Mikael Starvik | cb09f54 | 2005-07-27 11:44:27 -0700 | [diff] [blame] | 10 | #define R_CRIS_NONE 0 |
| 11 | #define R_CRIS_8 1 |
| 12 | #define R_CRIS_16 2 |
| 13 | #define R_CRIS_32 3 |
| 14 | #define R_CRIS_8_PCREL 4 |
| 15 | #define R_CRIS_16_PCREL 5 |
| 16 | #define R_CRIS_32_PCREL 6 |
| 17 | #define R_CRIS_GNU_VTINHERIT 7 |
| 18 | #define R_CRIS_GNU_VTENTRY 8 |
| 19 | #define R_CRIS_COPY 9 |
| 20 | #define R_CRIS_GLOB_DAT 10 |
| 21 | #define R_CRIS_JUMP_SLOT 11 |
| 22 | #define R_CRIS_RELATIVE 12 |
| 23 | #define R_CRIS_16_GOT 13 |
| 24 | #define R_CRIS_32_GOT 14 |
| 25 | #define R_CRIS_16_GOTPLT 15 |
| 26 | #define R_CRIS_32_GOTPLT 16 |
| 27 | #define R_CRIS_32_GOTREL 17 |
| 28 | #define R_CRIS_32_PLT_GOTREL 18 |
| 29 | #define R_CRIS_32_PLT_PCREL 19 |
| 30 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | typedef unsigned long elf_greg_t; |
| 32 | |
| 33 | /* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is |
| 34 | thus exposed to user-space. */ |
| 35 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) |
| 36 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
| 37 | |
| 38 | /* A placeholder; CRIS does not have any fp regs. */ |
| 39 | typedef unsigned long elf_fpregset_t; |
| 40 | |
| 41 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | * These are used to set parameters in the core dumps. |
| 43 | */ |
| 44 | #define ELF_CLASS ELFCLASS32 |
Mikael Starvik | cb09f54 | 2005-07-27 11:44:27 -0700 | [diff] [blame] | 45 | #define ELF_DATA ELFDATA2LSB |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | #define ELF_ARCH EM_CRIS |
| 47 | |
Jesper Nilsson | 556dcee | 2008-10-21 17:45:58 +0200 | [diff] [blame] | 48 | #include <arch/elf.h> |
David Woodhouse | ed9526b | 2006-09-21 09:33:55 +0100 | [diff] [blame] | 49 | |
Mikael Starvik | cb09f54 | 2005-07-27 11:44:27 -0700 | [diff] [blame] | 50 | /* The master for these definitions is {binutils}/include/elf/cris.h: */ |
| 51 | /* User symbols in this file have a leading underscore. */ |
| 52 | #define EF_CRIS_UNDERSCORE 0x00000001 |
| 53 | |
| 54 | /* This is a mask for different incompatible machine variants. */ |
| 55 | #define EF_CRIS_VARIANT_MASK 0x0000000e |
| 56 | |
| 57 | /* Variant 0; may contain v0..10 object. */ |
| 58 | #define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000 |
| 59 | |
| 60 | /* Variant 1; contains v32 object. */ |
| 61 | #define EF_CRIS_VARIANT_V32 0x00000002 |
| 62 | |
| 63 | /* Variant 2; contains object compatible with v32 and v10. */ |
| 64 | #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 |
| 65 | /* End of excerpt from {binutils}/include/elf/cris.h. */ |
| 66 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | #define ELF_EXEC_PAGESIZE 8192 |
| 68 | |
| 69 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
| 70 | use of this is to invoke "./ld.so someprog" to test out a new version of |
| 71 | the loader. We need to make sure that it is out of the way of the program |
| 72 | that it will "exec", and that there is sufficient room for the brk. */ |
| 73 | |
| 74 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) |
| 75 | |
| 76 | /* This yields a mask that user programs can use to figure out what |
| 77 | instruction set this CPU supports. This could be done in user space, |
| 78 | but it's not easy, and we've already done it here. */ |
| 79 | |
| 80 | #define ELF_HWCAP (0) |
| 81 | |
| 82 | /* This yields a string that ld.so will use to load implementation |
| 83 | specific libraries for optimization. This is more specific in |
| 84 | intent than poking at uname or /proc/cpuinfo. |
| 85 | */ |
| 86 | |
| 87 | #define ELF_PLATFORM (NULL) |
| 88 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | #endif |