--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:26 by OpenVMS SDL EV3-3 -- Source: 07-MAR-1996 10:23:40 $1$DGA8085:[LIB_ADA.LIS]IHDDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package IHDDEF is -- module $IHDDEF --+ -- IMAGE HEADER RECORD DEFINITIONS - FIRST RECORD OF IMAGE HEADER --- IHD_K_MAJORID : constant := 12848; -- Major id value IHD_K_MINORID : constant := 13616; -- Minor id value IHD_K_EXE : constant := 1; -- Executable image IHD_K_LIM : constant := 2; -- Linkable image IHD_M_LNKDEBUG : constant := 16#00000001#; IHD_M_LNKNOTFR : constant := 16#00000002#; IHD_M_NOP0BUFS : constant := 16#00000004#; IHD_M_PICIMG : constant := 16#00000008#; IHD_M_P0IMAGE : constant := 16#00000010#; IHD_M_DBGDMT : constant := 16#00000020#; IHD_M_INISHR : constant := 16#00000040#; IHD_M_IHSLONG : constant := 16#00000080#; IHD_M_UPCALLS : constant := 16#00000100#; IHD_M_MATCHCTL : constant := 16#07000000#; IHD_K_LENGTH : constant := 48; -- Length of fixed area IHD_C_LENGTH : constant := 48; -- Length of fixed area IHD_C_MINCODE : constant := -1; -- Low bound of ALIAS values IHD_C_NATIVE : constant := -1; -- Native mode image IHD_C_RSX : constant := 0; -- RSX image produced by TKB IHD_C_BPA : constant := 1; -- BASIC plus analog IHD_C_ALIAS : constant := 2; -- Last 126 bytes contains ASCIC of image to activate IHD_C_CLI : constant := 3; -- Image is a CLI, run LOGINOUT IHD_C_PMAX : constant := 4; -- PMAX system image IHD_C_ALPHA : constant := 5; -- ALPHA image IHD_C_MAXCODE : constant := 5; -- High bound of ALIAS values -- IHD_C_GEN_XLNKR : constant := 1; -- Cross linker IHD_C_GEN_NATIVE : constant := 2; -- First native mode image header. -- does not have LNKFLAGS, SYSVER and IAFVA fields IHD_C_GEN_LNKFLG : constant := 3; -- Native with LNKFLAGS longword added -- does not have SYSVER and IAFVA fields IHD_C_GEN_SYSVER : constant := 4; -- Native with LNKFLAGS and SYSVER added -- does not have IAFVA field IHD_C_GEN_FIXUP : constant := 5; -- Version III image -- contains LNKFLAGS, SYSVER, and IAFVA fields IHD_C_GEN_NEWISD : constant := 6; -- ISD size field is a byte IHD_S_IHDDEF : constant := 512; -- Old size name - synonym type IHD_LNKFLAGS_TYPE is -- Linker produced image flags record LNKDEBUG : BOOLEAN; -- Full debugging requested LNKNOTFR : BOOLEAN; -- First transfer address missing NOP0BUFS : BOOLEAN; -- RMS use of P0 for image i/o disabled PICIMG : BOOLEAN; -- Image is position independent P0IMAGE : BOOLEAN; -- Image is in P0 space only DBGDMT : BOOLEAN; -- Image header has dmt fields INISHR : BOOLEAN; -- Transfer array contains valid IHA$L_INISHR IHSLONG : BOOLEAN; -- Longword DSTBLKS and GSTRECS valid in IHS$ UPCALLS : BOOLEAN; -- Upcalls enabled FILLER_1 : UNSIGNED_15; -- FILL OUT TO HIGH BYTE OF LONG WORD MATCHCTL : UNSIGNED_3; -- Match control for linkable image FILLER_2 : UNSIGNED_5; end record; for IHD_LNKFLAGS_TYPE use record LNKDEBUG at 0 range 0 .. 0; LNKNOTFR at 0 range 1 .. 1; NOP0BUFS at 0 range 2 .. 2; PICIMG at 0 range 3 .. 3; P0IMAGE at 0 range 4 .. 4; DBGDMT at 0 range 5 .. 5; INISHR at 0 range 6 .. 6; IHSLONG at 0 range 7 .. 7; UPCALLS at 1 range 0 .. 0; FILLER_1 at 1 range 1 .. 15; MATCHCTL at 3 range 0 .. 2; FILLER_2 at 3 range 3 .. 7; end record; for IHD_LNKFLAGS_TYPE'SIZE use 32; IHD_LNKFLAGS_TYPE_INIT : constant IHD_LNKFLAGS_TYPE := (LNKDEBUG => FALSE, LNKNOTFR => FALSE, NOP0BUFS => FALSE, PICIMG => FALSE, P0IMAGE => FALSE, DBGDMT => FALSE, INISHR => FALSE, IHSLONG => FALSE, UPCALLS => FALSE, FILLER_1 => 0, MATCHCTL => 0, FILLER_2 => 0); type IHD_TYPE is record SIZE : UNSIGNED_WORD; -- Size in bytes of Image Header record ACTIVOFF : UNSIGNED_WORD; -- Byte offset to activation data SYMDBGOFF : UNSIGNED_WORD; -- Byte offset to symbol table and debug data IMGIDOFF : UNSIGNED_WORD; -- Byte offset to image ident data PATCHOFF : UNSIGNED_WORD; -- Byte offset to patch data VERSION_ARRAY_OFF : UNSIGNED_WORD; -- Byte offset to version number array MAJORID : UNSIGNED_WORD; -- Major id MINORID : UNSIGNED_WORD; -- Minor id HDRBLKCNT : UNSIGNED_BYTE; -- Count of header blocks IMGTYPE : UNSIGNED_BYTE; -- Image type -- -- IMAGE TYPE CODES -- FILLER_1 : UNSIGNED_WORD; -- Reserved PRIVREQS : UNSIGNED_QUADWORD; -- Requested privilege mask IOCHANCNT : UNSIGNED_WORD; -- ! of channels requested -- 0 if default IMGIOCNT : UNSIGNED_WORD; -- ! of pages of image i/o section requested -- 0 if default LNKFLAGS : IHD_LNKFLAGS_TYPE; -- Linker produced image flags IDENT : UNSIGNED_LONGWORD; -- GBL SEC ident value for linkable image SYSVER : UNSIGNED_LONGWORD; -- SYS$K_VERSION or 0 if not linked with exec IAFVA : ADDRESS; -- Relative virtual address of fixup info SKIP : STRING(1 .. 462); -- ALIAS should be last word in 512 byte block ALIAS : UNSIGNED_WORD; -- Code to use secondary image name -- ***************************************** -- -- Define legal range of ALIAS constants. MINCODE must be equal to the -- lowest value and MAXCODE must be equal to the highest value. -- -- ****************************************** -- -- Generation number returned by IMGSHR IMG$GET_IHD to SYSIMGACT. -- These do not appear in the image header but are inferred from the -- contents of the image header -- end record; for IHD_TYPE use record SIZE at 0 range 0 .. 15; ACTIVOFF at 2 range 0 .. 15; SYMDBGOFF at 4 range 0 .. 15; IMGIDOFF at 6 range 0 .. 15; PATCHOFF at 8 range 0 .. 15; VERSION_ARRAY_OFF at 10 range 0 .. 15; MAJORID at 12 range 0 .. 15; MINORID at 14 range 0 .. 15; HDRBLKCNT at 16 range 0 .. 7; IMGTYPE at 17 range 0 .. 7; FILLER_1 at 18 range 0 .. 15; PRIVREQS at 20 range 0 .. 63; IOCHANCNT at 28 range 0 .. 15; IMGIOCNT at 30 range 0 .. 15; LNKFLAGS at 32 range 0 .. 31; IDENT at 36 range 0 .. 31; SYSVER at 40 range 0 .. 31; IAFVA at 44 range 0 .. 31; SKIP at 48 range 0 .. 3695; ALIAS at 510 range 0 .. 15; end record; for IHD_TYPE'SIZE use 4096; IHD_TYPE_INIT : constant IHD_TYPE := (SIZE => 0, ACTIVOFF => 0, SYMDBGOFF => 0, IMGIDOFF => 0, PATCHOFF => 0, VERSION_ARRAY_OFF => 0, MAJORID => 0, MINORID => 0, HDRBLKCNT => 0, IMGTYPE => 0, FILLER_1 => 0, PRIVREQS => (0, 0), IOCHANCNT => 0, IMGIOCNT => 0, LNKFLAGS => IHD_LNKFLAGS_TYPE_INIT, IDENT => 0, SYSVER => 0, IAFVA => ADDRESS_ZERO, SKIP => (others => ASCII.NUL), ALIAS => 0); end IHDDEF;