mipspe.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* coff information for Windows CE with MIPS VR4111
  2. Copyright (C) 2000-2015 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  14. MA 02110-1301, USA. */
  15. #define L_LNNO_SIZE 2
  16. #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
  17. #include "coff/external.h"
  18. #define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */
  19. #define MIPS_PE_MAGIC 0x010b
  20. #define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
  21. /* define some NT default values */
  22. /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
  23. #define NT_SECTION_ALIGNMENT 0x1000
  24. #define NT_FILE_ALIGNMENT 0x200
  25. #define NT_DEF_RESERVE 0x100000
  26. #define NT_DEF_COMMIT 0x1000
  27. /********************** RELOCATION DIRECTIVES **********************/
  28. /* The external reloc has an offset field, because some of the reloc
  29. types on the h8 don't have room in the instruction for the entire
  30. offset - eg the strange jump and high page addressing modes. */
  31. struct external_reloc
  32. {
  33. char r_vaddr[4];
  34. char r_symndx[4];
  35. char r_type[2];
  36. };
  37. #define RELOC struct external_reloc
  38. #define RELSZ 10
  39. /* MIPS PE relocation types. */
  40. #define MIPS_R_ABSOLUTE 0 /* ignored */
  41. #define MIPS_R_REFHALF 1
  42. #define MIPS_R_REFWORD 2
  43. #define MIPS_R_JMPADDR 3
  44. #define MIPS_R_REFHI 4 /* PAIR follows */
  45. #define MIPS_R_REFLO 5
  46. #define MIPS_R_GPREL 6
  47. #define MIPS_R_LITERAL 7 /* same as GPREL */
  48. #define MIPS_R_SECTION 10
  49. #define MIPS_R_SECREL 11
  50. #define MIPS_R_SECRELLO 12
  51. #define MIPS_R_SECRELHI 13 /* PAIR follows */
  52. #define MIPS_R_RVA 34 /* 0x22 */
  53. #define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */