elf.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. */
  18. #ifndef _UAPI_ASM_NIOS2_ELF_H
  19. #define _UAPI_ASM_NIOS2_ELF_H
  20. #include <linux/ptrace.h>
  21. /* Relocation types */
  22. #define R_NIOS2_NONE 0
  23. #define R_NIOS2_S16 1
  24. #define R_NIOS2_U16 2
  25. #define R_NIOS2_PCREL16 3
  26. #define R_NIOS2_CALL26 4
  27. #define R_NIOS2_IMM5 5
  28. #define R_NIOS2_CACHE_OPX 6
  29. #define R_NIOS2_IMM6 7
  30. #define R_NIOS2_IMM8 8
  31. #define R_NIOS2_HI16 9
  32. #define R_NIOS2_LO16 10
  33. #define R_NIOS2_HIADJ16 11
  34. #define R_NIOS2_BFD_RELOC_32 12
  35. #define R_NIOS2_BFD_RELOC_16 13
  36. #define R_NIOS2_BFD_RELOC_8 14
  37. #define R_NIOS2_GPREL 15
  38. #define R_NIOS2_GNU_VTINHERIT 16
  39. #define R_NIOS2_GNU_VTENTRY 17
  40. #define R_NIOS2_UJMP 18
  41. #define R_NIOS2_CJMP 19
  42. #define R_NIOS2_CALLR 20
  43. #define R_NIOS2_ALIGN 21
  44. /* Keep this the last entry. */
  45. #define R_NIOS2_NUM 22
  46. typedef unsigned long elf_greg_t;
  47. #define ELF_NGREG 49
  48. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  49. typedef unsigned long elf_fpregset_t;
  50. /*
  51. * These are used to set parameters in the core dumps.
  52. */
  53. #define ELF_CLASS ELFCLASS32
  54. #define ELF_DATA ELFDATA2LSB
  55. #define ELF_ARCH EM_ALTERA_NIOS2
  56. #endif /* _UAPI_ASM_NIOS2_ELF_H */