elf.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #ifndef __ASM_AVR32_ELF_H
  2. #define __ASM_AVR32_ELF_H
  3. /* AVR32 relocation numbers */
  4. #define R_AVR32_NONE 0
  5. #define R_AVR32_32 1
  6. #define R_AVR32_16 2
  7. #define R_AVR32_8 3
  8. #define R_AVR32_32_PCREL 4
  9. #define R_AVR32_16_PCREL 5
  10. #define R_AVR32_8_PCREL 6
  11. #define R_AVR32_DIFF32 7
  12. #define R_AVR32_DIFF16 8
  13. #define R_AVR32_DIFF8 9
  14. #define R_AVR32_GOT32 10
  15. #define R_AVR32_GOT16 11
  16. #define R_AVR32_GOT8 12
  17. #define R_AVR32_21S 13
  18. #define R_AVR32_16U 14
  19. #define R_AVR32_16S 15
  20. #define R_AVR32_8S 16
  21. #define R_AVR32_8S_EXT 17
  22. #define R_AVR32_22H_PCREL 18
  23. #define R_AVR32_18W_PCREL 19
  24. #define R_AVR32_16B_PCREL 20
  25. #define R_AVR32_16N_PCREL 21
  26. #define R_AVR32_14UW_PCREL 22
  27. #define R_AVR32_11H_PCREL 23
  28. #define R_AVR32_10UW_PCREL 24
  29. #define R_AVR32_9H_PCREL 25
  30. #define R_AVR32_9UW_PCREL 26
  31. #define R_AVR32_HI16 27
  32. #define R_AVR32_LO16 28
  33. #define R_AVR32_GOTPC 29
  34. #define R_AVR32_GOTCALL 30
  35. #define R_AVR32_LDA_GOT 31
  36. #define R_AVR32_GOT21S 32
  37. #define R_AVR32_GOT18SW 33
  38. #define R_AVR32_GOT16S 34
  39. #define R_AVR32_GOT7UW 35
  40. #define R_AVR32_32_CPENT 36
  41. #define R_AVR32_CPCALL 37
  42. #define R_AVR32_16_CP 38
  43. #define R_AVR32_9W_CP 39
  44. #define R_AVR32_RELATIVE 40
  45. #define R_AVR32_GLOB_DAT 41
  46. #define R_AVR32_JMP_SLOT 42
  47. #define R_AVR32_ALIGN 43
  48. /*
  49. * ELF register definitions..
  50. */
  51. #include <asm/ptrace.h>
  52. #include <asm/user.h>
  53. typedef unsigned long elf_greg_t;
  54. #define ELF_NGREG (sizeof (struct pt_regs) / sizeof (elf_greg_t))
  55. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  56. typedef struct user_fpu_struct elf_fpregset_t;
  57. /*
  58. * This is used to ensure we don't load something for the wrong architecture.
  59. */
  60. #define elf_check_arch(x) ( (x)->e_machine == EM_AVR32 )
  61. /*
  62. * These are used to set parameters in the core dumps.
  63. */
  64. #define ELF_CLASS ELFCLASS32
  65. #ifdef __LITTLE_ENDIAN__
  66. #define ELF_DATA ELFDATA2LSB
  67. #else
  68. #define ELF_DATA ELFDATA2MSB
  69. #endif
  70. #define ELF_ARCH EM_AVR32
  71. #define ELF_EXEC_PAGESIZE 4096
  72. /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
  73. use of this is to invoke "./ld.so someprog" to test out a new version of
  74. the loader. We need to make sure that it is out of the way of the program
  75. that it will "exec", and that there is sufficient room for the brk. */
  76. #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
  77. /* This yields a mask that user programs can use to figure out what
  78. instruction set this CPU supports. This could be done in user space,
  79. but it's not easy, and we've already done it here. */
  80. #define ELF_HWCAP (0)
  81. /* This yields a string that ld.so will use to load implementation
  82. specific libraries for optimization. This is more specific in
  83. intent than poking at uname or /proc/cpuinfo.
  84. For the moment, we have only optimizations for the Intel generations,
  85. but that could change... */
  86. #define ELF_PLATFORM (NULL)
  87. #endif /* __ASM_AVR32_ELF_H */