| 1 |
/* Alpha VMS external format of Extended Image Section Descriptor. |
| 2 |
|
| 3 |
Copyright (C) 2010-2025 Free Software Foundation, Inc. |
| 4 |
Written by Tristan Gingold <[email protected]>, AdaCore. |
| 5 |
|
| 6 |
This file is part of BFD, the Binary File Descriptor library. |
| 7 |
|
| 8 |
This program is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3 of the License, or |
| 11 |
(at your option) any later version. |
| 12 |
|
| 13 |
This program is distributed in the hope that it will be useful, |
| 14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
GNU General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with this program; if not, write to the Free Software |
| 20 |
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| 21 |
MA 02110-1301, USA. */ |
| 22 |
|
| 23 |
#ifndef _VMS_EISD_H |
| 24 |
#define _VMS_EISD_H |
| 25 |
|
| 26 |
/* Flags. */ |
| 27 |
#define EISD__M_GBL 0x0001 /* Global. */ |
| 28 |
#define EISD__M_CRF 0x0002 /* Copy on reference. */ |
| 29 |
#define EISD__M_DZRO 0x0004 /* Demand zero page. */ |
| 30 |
#define EISD__M_WRT 0x0008 /* Writable. */ |
| 31 |
#define EISD__M_INITALCODE 0x0010 /* Part of initialization code. */ |
| 32 |
#define EISD__M_BASED 0x0020 /* Isect is based. */ |
| 33 |
#define EISD__M_FIXUPVEC 0x0040 /* Isect is fixup section. */ |
| 34 |
#define EISD__M_RESIDENT 0x0080 /* Isect is memory resident. */ |
| 35 |
#define EISD__M_VECTOR 0x0100 /* Vector contained in isect. */ |
| 36 |
#define EISD__M_PROTECT 0x0200 /* Isect is protected. */ |
| 37 |
#define EISD__M_LASTCLU 0x0400 /* Last cluster. */ |
| 38 |
#define EISD__M_EXE 0x0800 /* Code isect. */ |
| 39 |
#define EISD__M_NONSHRADR 0x1000 /* Contains non-shareable data. */ |
| 40 |
#define EISD__M_QUAD_LENGTH 0x2000 /* Quad length field valid. */ |
| 41 |
#define EISD__M_ALLOC_64BIT 0x4000 /* Allocate 64-bit space. */ |
| 42 |
|
| 43 |
#define EISD__K_LEN 36 |
| 44 |
#define EISD__K_LENEND 12 /* For end marker or next block. */ |
| 45 |
#define EISD__K_MAXLENGLBL 84 |
| 46 |
|
| 47 |
#define EISD__K_GBLNAMLEN 44 /* Size of the field. */ |
| 48 |
|
| 49 |
struct vms_eisd |
| 50 |
{ |
| 51 |
unsigned char majorid[4]; |
| 52 |
unsigned char minorid[4]; |
| 53 |
|
| 54 |
/* Size (in bytes) of this eisd. */ |
| 55 |
unsigned char eisdsize[4]; |
| 56 |
|
| 57 |
/* Size (in bytes) of the section. */ |
| 58 |
unsigned char secsize[4]; |
| 59 |
|
| 60 |
/* Virtual address of the section. */ |
| 61 |
unsigned char virt_addr[8]; |
| 62 |
|
| 63 |
/* Flags. */ |
| 64 |
unsigned char flags[4]; |
| 65 |
|
| 66 |
/* Base virtual block number. */ |
| 67 |
unsigned char vbn[4]; |
| 68 |
|
| 69 |
/* Page fault cluster. */ |
| 70 |
unsigned char pfc; |
| 71 |
|
| 72 |
/* Linker match control. */ |
| 73 |
unsigned char matchctl; |
| 74 |
|
| 75 |
/* Section type. */ |
| 76 |
unsigned char type; |
| 77 |
|
| 78 |
unsigned char fill_1; |
| 79 |
|
| 80 |
/* End of structure for normal records. */ |
| 81 |
|
| 82 |
/* Ident for global section. */ |
| 83 |
unsigned char ident[4]; |
| 84 |
|
| 85 |
/* Global name ascic. First 8 bytes are quad length field. */ |
| 86 |
unsigned char gblnam[EISD__K_GBLNAMLEN]; |
| 87 |
}; |
| 88 |
|
| 89 |
/* Versions. */ |
| 90 |
#define EISD__K_MAJORID 1 |
| 91 |
#define EISD__K_MINORID 1 |
| 92 |
|
| 93 |
/* Match control. */ |
| 94 |
#define EISD__K_MATALL 0 /* Match always. */ |
| 95 |
#define EISD__K_MATEQU 1 /* Match if equal. */ |
| 96 |
#define EISD__K_MATLEQ 2 /* Match if less or equal. */ |
| 97 |
#define EISD__K_MATNEV 3 /* Match never. */ |
| 98 |
|
| 99 |
/* Section type. */ |
| 100 |
#define EISD__K_NORMAL 0 /* Normal program image section. */ |
| 101 |
#define EISD__K_SHRFXD 1 /* Shareable fixed section. */ |
| 102 |
#define EISD__K_PRVFXD 2 /* Private fixed section. */ |
| 103 |
#define EISD__K_SHRPIC 3 /* Shareable pic section. */ |
| 104 |
#define EISD__K_PRVPIC 4 /* Private PIC section. */ |
| 105 |
#define EISD__K_USRSTACK 253 /* User stack section. */ |
| 106 |
|
| 107 |
/* EISD offsets. */ |
| 108 |
|
| 109 |
#define EISD__L_EISDSIZE 8 |
| 110 |
#define EISD__L_SECSIZE 12 |
| 111 |
#define EISD__Q_VIR_ADDR 16 |
| 112 |
#define EISD__L_FLAGS 24 |
| 113 |
#define EISD__L_VBN 28 |
| 114 |
#define EISD__R_CONTROL 32 |
| 115 |
#define EISD__L_IDENT 36 |
| 116 |
#define EISD__T_GBLNAM 40 |
| 117 |
|
| 118 |
#endif /* _VMS_EISD_H */ |