elf.h 2.7 KB

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