Merge remote branch 'origin/master'
[binutils/dougsmingw.git] / include / vms / eisd.h
blob7579e72b8296b3139a0645de3997d265e8c462e8
1 /* Alpha VMS external format of Extended Image Section Descriptor.
3 Copyright 2010 Free Software Foundation, Inc.
4 Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
6 This file is part of BFD, the Binary File Descriptor library.
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.
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.
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. */
23 #ifndef _VMS_EISD_H
24 #define _VMS_EISD_H
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. */
43 #define EISD__K_LEN 36
44 #define EISD__K_LENEND 12 /* For end marker or next block. */
45 #define EISD__K_MAXLENGLBL 84
47 #define EISD__K_GBLNAMLEN 44 /* Size of the field. */
49 struct vms_eisd
51 unsigned char majorid[4];
52 unsigned char minorid[4];
54 /* Size (in bytes) of this eisd. */
55 unsigned char eisdsize[4];
57 /* Size (in bytes) of the section. */
58 unsigned char secsize[4];
60 /* Virtual address of the section. */
61 unsigned char virt_addr[8];
63 /* Flags. */
64 unsigned char flags[4];
66 /* Base virtual block number. */
67 unsigned char vbn[4];
69 /* Page fault cluster. */
70 unsigned char pfc;
72 /* Linker match control. */
73 unsigned char matchctl;
75 /* Section type. */
76 unsigned char type;
78 unsigned char fill_1;
80 /* End of structure for normal records. */
82 /* Ident for global section. */
83 unsigned char ident[4];
85 /* Global name ascic. First 8 bytes are quad length field. */
86 unsigned char gblnam[EISD__K_GBLNAMLEN];
89 /* Versions. */
90 #define EISD__K_MAJORID 1
91 #define EISD__K_MINORID 1
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. */
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. */
107 /* EISD offsets. */
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
118 #endif /* _VMS_EISD_H */