eihd.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /* Alpha VMS external format of Extended Image Header.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
  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. #ifndef _VMS_EIHD_H
  18. #define _VMS_EIHD_H
  19. /* Extended Image Header (eihd) structure. */
  20. struct vms_eihd
  21. {
  22. /* Version of this EIHD. */
  23. unsigned char majorid[4];
  24. unsigned char minorid[4];
  25. /* Size in bytes of the header. */
  26. unsigned char size[4];
  27. /* Byte offset to ISD (Image Section Descriptors) list. */
  28. unsigned char isdoff[4];
  29. /* Byte offset to activation data (off=16). */
  30. unsigned char activoff[4];
  31. /* Byte offset to symbol table and debugging data. */
  32. unsigned char symdbgoff[4];
  33. /* Byte offset to image ident. */
  34. unsigned char imgidoff[4];
  35. /* Byte offset to patch data. */
  36. unsigned char patchoff[4];
  37. /* RVA of fixup info (off=32). */
  38. unsigned char iafva[8];
  39. /* RVA of symbol vector. */
  40. unsigned char symvva[8];
  41. /* Byte offset to version number array (off=48). */
  42. unsigned char version_array_off[4];
  43. /* Image type. */
  44. unsigned char imgtype[4];
  45. /* Image subtype. */
  46. unsigned char subtype[4];
  47. /* Size in bytes of image I/O section requested. */
  48. unsigned char imgiocnt[4];
  49. /* Nbr of channels requested (off=64). */
  50. unsigned char iochancnt[4];
  51. /* Requested privilege mask. */
  52. unsigned char privreqs[8];
  53. /* Number of header diskblocks. */
  54. unsigned char hdrblkcnt[4];
  55. /* Linker produced image flags. */
  56. unsigned char lnkflags[4];
  57. /* GBL SEC ident value for linkable image. */
  58. unsigned char ident[4];
  59. /* SYS$K_VERSION or 0 if not linked with exec. */
  60. unsigned char sysver[4];
  61. /* Linker match control. */
  62. unsigned char matchctl;
  63. unsigned char fill_1[3];
  64. /* Size of the symbol vector in bytes. */
  65. unsigned char symvect_size[4];
  66. /* Value of /BPAGE. */
  67. unsigned char virt_mem_block_size[4];
  68. /* Byte offset to extended fixup data. */
  69. unsigned char ext_fixup_off[4];
  70. /* Byte offset to no_optimize psect table. */
  71. unsigned char noopt_psect_off[4];
  72. unsigned char fill_2[398];
  73. /* CODE identifies image type to MOM. */
  74. unsigned char alias[2];
  75. };
  76. #define EIHD__K_MAJORID 3 /* Major id constant */
  77. #define EIHD__K_MINORID 0 /* Minor id constant */
  78. /* Image type. */
  79. #define EIHD__K_EXE 1 /* Executable image */
  80. #define EIHD__K_LIM 2 /* Linkable image. */
  81. /* Image subtype. */
  82. #define EIHD__C_NATIVE 0 /* Alpha native image. */
  83. #define EIHD__C_CLI 1 /* Image is a CLI, run LOGINOUT. */
  84. /* Linker image flags. */
  85. #define EIHD__M_LNKDEBUG 0x0001 /* Full debugging requested. */
  86. #define EIHD__M_LNKNOTFR 0x0002 /* No first transfer address. */
  87. #define EIHD__M_NOP0BUFS 0x0004 /* No RMS use of P0 for image I/O. */
  88. #define EIHD__M_PICIMG 0x0008 /* PIC image. */
  89. #define EIHD__M_P0IMAGE 0x0010 /* P0 only image. */
  90. #define EIHD__M_DBGDMT 0x0020 /* Image header has dmt fields. */
  91. #define EIHD__M_INISHR 0x0040 /* Transfer array contains LNISHR. */
  92. #define EIHD__M_XLATED 0x0080 /* Translated image. */
  93. #define EIHD__M_BIND_CODE_SEC 0x0100 /* EXE sect can be put into S0. */
  94. #define EIHD__M_BIND_DATA_SEC 0x0200 /* DATA sect can be put into S0. */
  95. #define EIHD__M_MKTHREADS 0x0400 /* Multiple kernel threads. */
  96. #define EIHD__M_UPCALLS 0x0800 /* Upcalls enabled. */
  97. #define EIHD__M_OMV_READY 0x1000 /* Can be processed by OMV. */
  98. #define EIHD__M_EXT_BIND_SECT 0x2000 /* May be moved, using ext fixups. */
  99. /* Offsets of some fields. */
  100. #define EIHD__L_SIZE 8
  101. #define EIHD__L_ISDOFF 12
  102. #define EIHD__L_SYMDBGOFF 20
  103. #define EIHD__Q_SYMVVA 40
  104. #define EIHD__L_IMGTYPE 52
  105. #define EIHD__C_LENGTH 104
  106. #endif /* _VMS_EIHD_H */