mcore.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* Motorola MCore support for BFD.
  2. Copyright (C) 1999-2015 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  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 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. /* This file holds definitions specific to the MCore COFF/PE ABI. */
  17. #ifndef _COFF_MORE_H
  18. #define _COFF_MORE_H
  19. #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
  20. #define L_LNNO_SIZE 2
  21. #include "coff/external.h"
  22. #define MCOREMAGIC 0xb00 /* I just made this up */
  23. #define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
  24. #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
  25. #define IMAGE_REL_MCORE_ABSOLUTE 0x0000
  26. #define IMAGE_REL_MCORE_ADDR32 0x0001
  27. #define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002
  28. #define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003
  29. #define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004
  30. #define IMAGE_REL_MCORE_PCREL_32 0x0005
  31. #define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006
  32. #define IMAGE_REL_MCORE_RVA 0x0007
  33. #define PEMCORE
  34. #define OMAGIC 0404 /* object files, eg as output */
  35. #define ZMAGIC 0413 /* demand load format, eg normal ld output */
  36. #define STMAGIC 0401 /* target shlib */
  37. #define SHMAGIC 0443 /* host shlib */
  38. /* From winnt.h */
  39. #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
  40. /* Define some NT default values. */
  41. #define NT_SECTION_ALIGNMENT 0x1000
  42. #define NT_FILE_ALIGNMENT 0x200
  43. #define NT_DEF_RESERVE 0x100000
  44. #define NT_DEF_COMMIT 0x1000
  45. struct external_reloc
  46. {
  47. char r_vaddr [4];
  48. char r_symndx [4];
  49. char r_type [2];
  50. char r_offset [4];
  51. };
  52. #define RELOC struct external_reloc
  53. #define RELSZ 14
  54. #endif /* __COFF_MCORE_H */