arc.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* ARC ELF support for BFD.
  2. Copyright (C) 1995-2015 Free Software Foundation, Inc.
  3. Contributed by Doug Evans, (dje@cygnus.com)
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  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. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. /* This file holds definitions specific to the ARC ELF ABI. */
  18. #ifndef _ELF_ARC_H
  19. #define _ELF_ARC_H
  20. #include "elf/reloc-macros.h"
  21. /* Relocations. */
  22. #define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
  23. RELOC_NUMBER(R_##TYPE, VALUE)
  24. START_RELOC_NUMBERS (elf_arc_reloc_type)
  25. #include "arc-reloc.def"
  26. END_RELOC_NUMBERS (R_ARC_max)
  27. #undef ARC_RELOC_HOWTO
  28. /* Processor specific flags for the ELF header e_flags field. */
  29. /* Four bit ARC machine type field. */
  30. #define EF_ARC_MACH_MSK 0x000000ff
  31. #define EF_ARC_OSABI_MSK 0x00000f00
  32. #define EF_ARC_ALL_MSK (EF_ARC_MACH_MSK | EF_ARC_OSABI_MSK)
  33. /* Four bit ARC machine type field. */
  34. #define EF_ARC_MACH 0x0000000f
  35. /* Various CPU types. */
  36. #define E_ARC_MACH_ARC600 0x00000002
  37. #define E_ARC_MACH_ARC601 0x00000004
  38. #define E_ARC_MACH_ARC700 0x00000003
  39. /* Processor specific flags for the ELF header e_flags field. */
  40. #define EF_ARC_CPU_GENERIC 0x00000000
  41. #define EF_ARC_CPU_ARCV2EM 0x00000005
  42. #define EF_ARC_CPU_ARCV2HS 0x00000006
  43. /* ARC Linux specific ABIs. */
  44. #define E_ARC_OSABI_ORIG 0x00000000 /* MUST be 0 for back-compat. */
  45. #define E_ARC_OSABI_V2 0x00000200
  46. #define E_ARC_OSABI_V3 0x00000300
  47. #define E_ARC_OSABI_CURRENT E_ARC_OSABI_V3
  48. /* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. */
  49. /* File contains position independent code. */
  50. #define EF_ARC_PIC 0x00000100
  51. #endif /* _ELF_ARC_H */