eisd.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* Alpha VMS external format of Extended Image Section Descriptor.
  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_EISD_H
  18. #define _VMS_EISD_H
  19. /* Flags. */
  20. #define EISD__M_GBL 0x0001 /* Global. */
  21. #define EISD__M_CRF 0x0002 /* Copy on reference. */
  22. #define EISD__M_DZRO 0x0004 /* Demand zero page. */
  23. #define EISD__M_WRT 0x0008 /* Writable. */
  24. #define EISD__M_INITALCODE 0x0010 /* Part of initialization code. */
  25. #define EISD__M_BASED 0x0020 /* Isect is based. */
  26. #define EISD__M_FIXUPVEC 0x0040 /* Isect is fixup section. */
  27. #define EISD__M_RESIDENT 0x0080 /* Isect is memory resident. */
  28. #define EISD__M_VECTOR 0x0100 /* Vector contained in isect. */
  29. #define EISD__M_PROTECT 0x0200 /* Isect is protected. */
  30. #define EISD__M_LASTCLU 0x0400 /* Last cluster. */
  31. #define EISD__M_EXE 0x0800 /* Code isect. */
  32. #define EISD__M_NONSHRADR 0x1000 /* Contains non-shareable data. */
  33. #define EISD__M_QUAD_LENGTH 0x2000 /* Quad length field valid. */
  34. #define EISD__M_ALLOC_64BIT 0x4000 /* Allocate 64-bit space. */
  35. #define EISD__K_LEN 36
  36. #define EISD__K_LENEND 12 /* For end marker or next block. */
  37. #define EISD__K_MAXLENGLBL 84
  38. #define EISD__K_GBLNAMLEN 44 /* Size of the field. */
  39. struct vms_eisd
  40. {
  41. unsigned char majorid[4];
  42. unsigned char minorid[4];
  43. /* Size (in bytes) of this eisd. */
  44. unsigned char eisdsize[4];
  45. /* Size (in bytes) of the section. */
  46. unsigned char secsize[4];
  47. /* Virtual address of the section. */
  48. unsigned char virt_addr[8];
  49. /* Flags. */
  50. unsigned char flags[4];
  51. /* Base virtual block number. */
  52. unsigned char vbn[4];
  53. /* Page fault cluster. */
  54. unsigned char pfc;
  55. /* Linker match control. */
  56. unsigned char matchctl;
  57. /* Section type. */
  58. unsigned char type;
  59. unsigned char fill_1;
  60. /* End of structure for normal records. */
  61. /* Ident for global section. */
  62. unsigned char ident[4];
  63. /* Global name ascic. First 8 bytes are quad length field. */
  64. unsigned char gblnam[EISD__K_GBLNAMLEN];
  65. };
  66. /* Versions. */
  67. #define EISD__K_MAJORID 1
  68. #define EISD__K_MINORID 1
  69. /* Match control. */
  70. #define EISD__K_MATALL 0 /* Match always. */
  71. #define EISD__K_MATEQU 1 /* Match if equal. */
  72. #define EISD__K_MATLEQ 2 /* Match if less or equal. */
  73. #define EISD__K_MATNEV 3 /* Match never. */
  74. /* Section type. */
  75. #define EISD__K_NORMAL 0 /* Normal program image section. */
  76. #define EISD__K_SHRFXD 1 /* Shareable fixed section. */
  77. #define EISD__K_PRVFXD 2 /* Private fixed section. */
  78. #define EISD__K_SHRPIC 3 /* Shareable pic section. */
  79. #define EISD__K_PRVPIC 4 /* Private PIC section. */
  80. #define EISD__K_USRSTACK 253 /* User stack section. */
  81. /* EISD offsets. */
  82. #define EISD__L_EISDSIZE 8
  83. #define EISD__L_SECSIZE 12
  84. #define EISD__Q_VIR_ADDR 16
  85. #define EISD__L_FLAGS 24
  86. #define EISD__L_VBN 28
  87. #define EISD__R_CONTROL 32
  88. #define EISD__L_IDENT 36
  89. #define EISD__T_GBLNAM 40
  90. #endif /* _VMS_EISD_H */