ia64.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* coff information for HP/Intel IA-64.
  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 DO_NOT_DEFINE_AOUTHDR
  16. #define L_LNNO_SIZE 2
  17. #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
  18. #include "coff/external.h"
  19. #define IA64MAGIC 0x200
  20. #define IA64BADMAG(x) (((x).f_magic != IA64MAGIC))
  21. /* Bits for f_flags:
  22. * F_RELFLG relocation info stripped from file
  23. * F_EXEC file is executable (no unresolved external references)
  24. * F_LNNO line numbers stripped from file
  25. * F_LSYMS local symbols stripped from file
  26. * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
  27. */
  28. #define F_RELFLG (0x0001)
  29. #define F_EXEC (0x0002)
  30. #define F_LNNO (0x0004)
  31. #define F_LSYMS (0x0008)
  32. /********************** AOUT "OPTIONAL HEADER" **********************/
  33. typedef struct
  34. {
  35. char magic[2]; /* type of file */
  36. char vstamp[2]; /* version stamp */
  37. char tsize[4]; /* text size in bytes, padded to FW bdry*/
  38. char dsize[4]; /* initialized data " " */
  39. char bsize[4]; /* uninitialized data " " */
  40. char entry[4]; /* entry pt. */
  41. char text_start[4]; /* base of text used for this file */
  42. #ifndef BFD64
  43. char data_start[4]; /* base of data used for this file */
  44. #endif
  45. }
  46. AOUTHDR;
  47. #define PE32MAGIC 0x10b /* 32-bit image */
  48. #define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */
  49. #define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
  50. #define AOUTSZ 108
  51. #define AOUTHDRSZ 108
  52. #define OMAGIC 0404 /* object files, eg as output */
  53. #define ZMAGIC 0413 /* demand load format, eg normal ld output */
  54. #define STMAGIC 0401 /* target shlib */
  55. #define SHMAGIC 0443 /* host shlib */
  56. /* define some NT default values */
  57. /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
  58. #define NT_SECTION_ALIGNMENT 0x1000
  59. #define NT_FILE_ALIGNMENT 0x200
  60. #define NT_DEF_RESERVE 0x100000
  61. #define NT_DEF_COMMIT 0x1000
  62. /********************** RELOCATION DIRECTIVES **********************/
  63. struct external_reloc
  64. {
  65. char r_vaddr[4];
  66. char r_symndx[4];
  67. char r_type[2];
  68. };
  69. #define RELOC struct external_reloc
  70. #define RELSZ 10