source: trunk/src/binutils/bfd/vms.h@ 29

Last change on this file since 29 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 24.8 KB
RevLine 
[10]1#undef vms
2/* vms.h -- Header file for VMS (Alpha and Vax) support.
3 Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
4
5 Written by Klaus K"ampf ([email protected])
6
7This file is part of BFD, the Binary File Descriptor library.
8
9This program is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2 of the License, or
12(at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22
23#ifndef VMS_H
24#define VMS_H
25
26/* Constants starting with 'Exxx_' are for openVMS/Alpha (EVAX object language) */
27
28/* VMS Text, information and relocation record (TIR/ETIR) definitions. */
29
30#define TIR_S_C_STA_GBL 0
31#define TIR_S_C_STA_SB 1
32#define TIR_S_C_STA_SW 2
33#define TIR_S_C_STA_LW 3
34#define TIR_S_C_STA_PB 4
35#define TIR_S_C_STA_PW 5
36#define TIR_S_C_STA_PL 6
37#define TIR_S_C_STA_UB 7
38#define TIR_S_C_STA_UW 8
39#define TIR_S_C_STA_BFI 9
40#define TIR_S_C_STA_WFI 10
41#define TIR_S_C_STA_LFI 11
42#define TIR_S_C_STA_EPM 12
43#define TIR_S_C_STA_CKARG 13
44#define TIR_S_C_STA_WPB 14
45#define TIR_S_C_STA_WPW 15
46#define TIR_S_C_STA_WPL 16
47#define TIR_S_C_STA_LSY 17
48#define TIR_S_C_STA_LIT 18
49#define TIR_S_C_STA_LEPM 19
50#define TIR_S_C_MAXSTACOD 19
51#define TIR_S_C_MINSTOCOD 20
52#define TIR_S_C_STO_SB 20
53#define TIR_S_C_STO_SW 21
54#define TIR_S_C_STO_L 22
55#define TIR_S_C_STO_LW 22
56#define TIR_S_C_STO_BD 23
57#define TIR_S_C_STO_WD 24
58#define TIR_S_C_STO_LD 25
59#define TIR_S_C_STO_LI 26
60#define TIR_S_C_STO_PIDR 27
61#define TIR_S_C_STO_PICR 28
62#define TIR_S_C_STO_RSB 29
63#define TIR_S_C_STO_RSW 30
64#define TIR_S_C_STO_RL 31
65#define TIR_S_C_STO_VPS 32
66#define TIR_S_C_STO_USB 33
67#define TIR_S_C_STO_USW 34
68#define TIR_S_C_STO_RUB 35
69#define TIR_S_C_STO_RUW 36
70#define TIR_S_C_STO_B 37
71#define TIR_S_C_STO_W 38
72#define TIR_S_C_STO_RB 39
73#define TIR_S_C_STO_RW 40
74#define TIR_S_C_STO_RIVB 41
75#define TIR_S_C_STO_PIRR 42
76#define TIR_S_C_MAXSTOCOD 42
77#define TIR_S_C_MINOPRCOD 50
78#define TIR_S_C_OPR_NOP 50
79#define TIR_S_C_OPR_ADD 51
80#define TIR_S_C_OPR_SUB 52
81#define TIR_S_C_OPR_MUL 53
82#define TIR_S_C_OPR_DIV 54
83#define TIR_S_C_OPR_AND 55
84#define TIR_S_C_OPR_IOR 56
85#define TIR_S_C_OPR_EOR 57
86#define TIR_S_C_OPR_NEG 58
87#define TIR_S_C_OPR_COM 59
88#define TIR_S_C_OPR_INSV 60
89#define TIR_S_C_OPR_ASH 61
90#define TIR_S_C_OPR_USH 62
91#define TIR_S_C_OPR_ROT 63
92#define TIR_S_C_OPR_SEL 64
93#define TIR_S_C_OPR_REDEF 65
94#define TIR_S_C_OPR_DFLIT 66
95#define TIR_S_C_MAXOPRCOD 66
96#define TIR_S_C_MINCTLCOD 80
97#define TIR_S_C_CTL_SETRB 80
98#define TIR_S_C_CTL_AUGRB 81
99#define TIR_S_C_CTL_DFLOC 82
100#define TIR_S_C_CTL_STLOC 83
101#define TIR_S_C_CTL_STKDL 84
102#define TIR_S_C_MAXCTLCOD 84
103
104#define ETIR_S_C_MINSTACOD 0 /* Minimum store code */
105#define ETIR_S_C_STA_GBL 0 /* Stack global symbol value */
106#define ETIR_S_C_STA_LW 1 /* Stack longword */
107#define ETIR_S_C_STA_QW 2 /* Stack quadword */
108#define ETIR_S_C_STA_PQ 3 /* Stack psect base plus quadword offset */
109#define ETIR_S_C_STA_LI 4 /* Stack literal */
110#define ETIR_S_C_STA_MOD 5 /* Stack module */
111#define ETIR_S_C_STA_CKARG 6 /* Check Arguments */
112#define ETIR_S_C_MAXSTACOD 6 /* Maximum stack code */
113#define ETIR_S_C_MINSTOCOD 50 /* Minimum store code */
114#define ETIR_S_C_STO_B 50 /* Store byte */
115#define ETIR_S_C_STO_W 51 /* Store word */
116#define ETIR_S_C_STO_LW 52 /* Store longword */
117#define ETIR_S_C_STO_QW 53 /* Store quadword */
118#define ETIR_S_C_STO_IMMR 54 /* Store immediate Repeated */
119#define ETIR_S_C_STO_GBL 55 /* Store global */
120#define ETIR_S_C_STO_CA 56 /* Store code address */
121#define ETIR_S_C_STO_RB 57 /* Store relative branch */
122#define ETIR_S_C_STO_AB 58 /* Store absolute branch */
123#define ETIR_S_C_STO_OFF 59 /* Store offset within psect */
124#define ETIR_S_C_STO_IMM 61 /* Store immediate */
125#define ETIR_S_C_STO_GBL_LW 62 /* Store global Longword */
126#define ETIR_S_C_STO_LP_PSB 63 /* STO_LP_PSB not valid in level 2 use STC_LP_PSB */
127#define ETIR_S_C_STO_HINT_GBL 64 /* Store 14 bit HINT at global address */
128#define ETIR_S_C_STO_HINT_PS 65 /* Store 14 bit HINT at psect + offset */
129#define ETIR_S_C_MAXSTOCOD 65 /* Maximum store code */
130#define ETIR_S_C_MINOPRCOD 100 /* Minimum operate code */
131#define ETIR_S_C_OPR_NOP 100 /* No-op */
132#define ETIR_S_C_OPR_ADD 101 /* Add */
133#define ETIR_S_C_OPR_SUB 102 /* Subtract */
134#define ETIR_S_C_OPR_MUL 103 /* Multiply */
135#define ETIR_S_C_OPR_DIV 104 /* Divide */
136#define ETIR_S_C_OPR_AND 105 /* Logical AND */
137#define ETIR_S_C_OPR_IOR 106 /* Logical inclusive OR */
138#define ETIR_S_C_OPR_EOR 107 /* Logical exclusive OR */
139#define ETIR_S_C_OPR_NEG 108 /* Negate */
140#define ETIR_S_C_OPR_COM 109 /* Complement */
141#define ETIR_S_C_OPR_INSV 110 /* Insert bit field */
142#define ETIR_S_C_OPR_ASH 111 /* Arithmetic shift */
143#define ETIR_S_C_OPR_USH 112 /* Unsigned shift */
144#define ETIR_S_C_OPR_ROT 113 /* Rotate */
145#define ETIR_S_C_OPR_SEL 114 /* Select one of three longwords on top of stack */
146#define ETIR_S_C_OPR_REDEF 115 /* Redefine this symbol after pass 2 */
147#define ETIR_S_C_OPR_DFLIT 116 /* Define a literal */
148#define ETIR_S_C_MAXOPRCOD 116 /* Maximum operate code */
149#define ETIR_S_C_MINCTLCOD 150 /* Minimum control code */
150#define ETIR_S_C_CTL_SETRB 150 /* Set relocation base */
151#define ETIR_S_C_CTL_AUGRB 151 /* Augment relocation base */
152#define ETIR_S_C_CTL_DFLOC 152 /* Define debug location */
153#define ETIR_S_C_CTL_STLOC 153 /* Set debug location */
154#define ETIR_S_C_CTL_STKDL 154 /* Stack debug location */
155#define ETIR_S_C_MAXCTLCOD 154 /* Maximum control code */
156#define ETIR_S_C_MINSTCCOD 200 /* Minimum store-conditional code */
157#define ETIR_S_C_STC_LP 200 /* Store-conditional Linkage Pair */
158#define ETIR_S_C_STC_LP_PSB 201 /* Store-conditional Linkage Pair with Procedure Signature */
159#define ETIR_S_C_STC_GBL 202 /* Store-conditional Address at global address */
160#define ETIR_S_C_STC_GCA 203 /* Store-conditional Code Address at global address */
161#define ETIR_S_C_STC_PS 204 /* Store-conditional Address at psect + offset */
162#define ETIR_S_C_STC_NOP_GBL 205 /* Store-conditional NOP at address of global */
163#define ETIR_S_C_STC_NOP_PS 206 /* Store-conditional NOP at pect + offset */
164#define ETIR_S_C_STC_BSR_GBL 207 /* Store-conditional BSR at global address */
165#define ETIR_S_C_STC_BSR_PS 208 /* Store-conditional BSR at pect + offset */
166#define ETIR_S_C_STC_LDA_GBL 209 /* Store-conditional LDA at global address */
167#define ETIR_S_C_STC_LDA_PS 210 /* Store-conditional LDA at psect + offset */
168#define ETIR_S_C_STC_BOH_GBL 211 /* Store-conditional BSR or Hint at global address */
169#define ETIR_S_C_STC_BOH_PS 212 /* Store-conditional BSR or Hint at pect + offset */
170#define ETIR_S_C_STC_NBH_GBL 213 /* Store-conditional NOP,BSR or HINT at global address */
171#define ETIR_S_C_STC_NBH_PS 214 /* Store-conditional NOP,BSR or HINT at psect + offset */
172#define ETIR_S_C_MAXSTCCOD 214 /* Maximum store-conditional code */
173
174/* VMS Global symbol definition record (GSD/EGSD). */
175
176#define GSD_S_K_ENTRIES 1
177#define GSD_S_C_ENTRIES 1
178#define GSD_S_C_PSC 0
179#define GSD_S_C_SYM 1
180#define GSD_S_C_EPM 2
181#define GSD_S_C_PRO 3
182#define GSD_S_C_SYMW 4
183#define GSD_S_C_EPMW 5
184#define GSD_S_C_PROW 6
185#define GSD_S_C_IDC 7
186#define GSD_S_C_ENV 8
187#define GSD_S_C_LSY 9
188#define GSD_S_C_LEPM 10
189#define GSD_S_C_LPRO 11
190#define GSD_S_C_SPSC 12
191#define GSD_S_C_SYMV 13
192#define GSD_S_C_EPMV 14
193#define GSD_S_C_PROV 15
194#define GSD_S_C_MAXRECTYP 15
195
196#define EGSD_S_K_ENTRIES 2 /* Offset to first entry in record */
197#define EGSD_S_C_ENTRIES 2 /* Offset to first entry in record */
198#define EGSD_S_C_PSC 0 /* Psect definition */
199#define EGSD_S_C_SYM 1 /* Symbol specification */
200#define EGSD_S_C_IDC 2 /* Random entity check */
201#define EGSD_S_C_SPSC 5 /* Shareable image psect definition */
202#define EGSD_S_C_SYMV 6 /* Vectored (dual-valued) versions of SYM, */
203#define EGSD_S_C_SYMM 7 /* Masked versions of SYM, */
204#define EGSD_S_C_SYMG 8 /* EGST - gst version of SYM */
205#define EGSD_S_C_MAXRECTYP 8 /* Maximum entry type defined */
206
207#define GPS_S_M_PIC 1
208#define GPS_S_M_LIB 2
209#define GPS_S_M_OVR 4
210#define GPS_S_M_REL 8
211#define GPS_S_M_GBL 16
212#define GPS_S_M_SHR 32
213#define GPS_S_M_EXE 64
214#define GPS_S_M_RD 128
215#define GPS_S_M_WRT 256
216#define GPS_S_M_VEC 512
217#define GPS_S_K_NAME 9
218#define GPS_S_C_NAME 9
219
220#define EGPS_S_V_PIC 0x0001
221#define EGPS_S_V_LIB 0x0002
222#define EGPS_S_V_OVR 0x0004
223#define EGPS_S_V_REL 0x0008
224#define EGPS_S_V_GBL 0x0010
225#define EGPS_S_V_SHR 0x0020
226#define EGPS_S_V_EXE 0x0040
227#define EGPS_S_V_RD 0x0080
228#define EGPS_S_V_WRT 0x0100
229#define EGPS_S_V_VEC 0x0200
230#define EGPS_S_V_NOMOD 0x0400
231#define EGPS_S_V_COM 0x0800
232
233#define GSY_S_M_WEAK 1
234#define GSY_S_M_DEF 2
235#define GSY_S_M_UNI 4
236#define GSY_S_M_REL 8
237
238#define EGSY_S_V_WEAK 0x0001
239#define EGSY_S_V_DEF 0x0002
240#define EGSY_S_V_UNI 0x0004
241#define EGSY_S_V_REL 0x0008
242#define EGSY_S_V_COMM 0x0010
243#define EGSY_S_V_VECEP 0x0020
244#define EGSY_S_V_NORM 0x0040
245
246#define LSY_S_M_DEF 2
247#define LSY_S_M_REL 8
248
249#define ENV_S_M_DEF 1
250#define ENV_S_M_NESTED 2
251
252/*
253 * Debugger symbol definitions: These are done by hand, as no
254 * machine-readable version seems
255 * to be available.
256 */
257#define DST_S_C_C 7 /* Language == "C" */
258#define DST_S_C_CXX 15 /* Language == "C++" */
259#define DST_S_C_VERSION 153
260#define DST_S_C_SOURCE 155 /* Source file */
261#define DST_S_C_PROLOG 162
262#define DST_S_C_BLKBEG 176 /* Beginning of block */
263#define DST_S_C_BLKEND 177 /* End of block */
264#define DST_S_C_ENTRY 181