elf.h 2.8 KB

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