00001 #undef vms
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VMS_H
00025 #define VMS_H
00026
00027
00028
00029
00030
00031 #define TIR_S_C_STA_GBL 0
00032 #define TIR_S_C_STA_SB 1
00033 #define TIR_S_C_STA_SW 2
00034 #define TIR_S_C_STA_LW 3
00035 #define TIR_S_C_STA_PB 4
00036 #define TIR_S_C_STA_PW 5
00037 #define TIR_S_C_STA_PL 6
00038 #define TIR_S_C_STA_UB 7
00039 #define TIR_S_C_STA_UW 8
00040 #define TIR_S_C_STA_BFI 9
00041 #define TIR_S_C_STA_WFI 10
00042 #define TIR_S_C_STA_LFI 11
00043 #define TIR_S_C_STA_EPM 12
00044 #define TIR_S_C_STA_CKARG 13
00045 #define TIR_S_C_STA_WPB 14
00046 #define TIR_S_C_STA_WPW 15
00047 #define TIR_S_C_STA_WPL 16
00048 #define TIR_S_C_STA_LSY 17
00049 #define TIR_S_C_STA_LIT 18
00050 #define TIR_S_C_STA_LEPM 19
00051 #define TIR_S_C_MAXSTACOD 19
00052 #define TIR_S_C_MINSTOCOD 20
00053 #define TIR_S_C_STO_SB 20
00054 #define TIR_S_C_STO_SW 21
00055 #define TIR_S_C_STO_L 22
00056 #define TIR_S_C_STO_LW 22
00057 #define TIR_S_C_STO_BD 23
00058 #define TIR_S_C_STO_WD 24
00059 #define TIR_S_C_STO_LD 25
00060 #define TIR_S_C_STO_LI 26
00061 #define TIR_S_C_STO_PIDR 27
00062 #define TIR_S_C_STO_PICR 28
00063 #define TIR_S_C_STO_RSB 29
00064 #define TIR_S_C_STO_RSW 30
00065 #define TIR_S_C_STO_RL 31
00066 #define TIR_S_C_STO_VPS 32
00067 #define TIR_S_C_STO_USB 33
00068 #define TIR_S_C_STO_USW 34
00069 #define TIR_S_C_STO_RUB 35
00070 #define TIR_S_C_STO_RUW 36
00071 #define TIR_S_C_STO_B 37
00072 #define TIR_S_C_STO_W 38
00073 #define TIR_S_C_STO_RB 39
00074 #define TIR_S_C_STO_RW 40
00075 #define TIR_S_C_STO_RIVB 41
00076 #define TIR_S_C_STO_PIRR 42
00077 #define TIR_S_C_MAXSTOCOD 42
00078 #define TIR_S_C_MINOPRCOD 50
00079 #define TIR_S_C_OPR_NOP 50
00080 #define TIR_S_C_OPR_ADD 51
00081 #define TIR_S_C_OPR_SUB 52
00082 #define TIR_S_C_OPR_MUL 53
00083 #define TIR_S_C_OPR_DIV 54
00084 #define TIR_S_C_OPR_AND 55
00085 #define TIR_S_C_OPR_IOR 56
00086 #define TIR_S_C_OPR_EOR 57
00087 #define TIR_S_C_OPR_NEG 58
00088 #define TIR_S_C_OPR_COM 59
00089 #define TIR_S_C_OPR_INSV 60
00090 #define TIR_S_C_OPR_ASH 61
00091 #define TIR_S_C_OPR_USH 62
00092 #define TIR_S_C_OPR_ROT 63
00093 #define TIR_S_C_OPR_SEL 64
00094 #define TIR_S_C_OPR_REDEF 65
00095 #define TIR_S_C_OPR_DFLIT 66
00096 #define TIR_S_C_MAXOPRCOD 66
00097 #define TIR_S_C_MINCTLCOD 80
00098 #define TIR_S_C_CTL_SETRB 80
00099 #define TIR_S_C_CTL_AUGRB 81
00100 #define TIR_S_C_CTL_DFLOC 82
00101 #define TIR_S_C_CTL_STLOC 83
00102 #define TIR_S_C_CTL_STKDL 84
00103 #define TIR_S_C_MAXCTLCOD 84
00104
00105 #define ETIR_S_C_MINSTACOD 0
00106 #define ETIR_S_C_STA_GBL 0
00107 #define ETIR_S_C_STA_LW 1
00108 #define ETIR_S_C_STA_QW 2
00109 #define ETIR_S_C_STA_PQ 3
00110 #define ETIR_S_C_STA_LI 4
00111 #define ETIR_S_C_STA_MOD 5
00112 #define ETIR_S_C_STA_CKARG 6
00113 #define ETIR_S_C_MAXSTACOD 6
00114 #define ETIR_S_C_MINSTOCOD 50
00115 #define ETIR_S_C_STO_B 50
00116 #define ETIR_S_C_STO_W 51
00117 #define ETIR_S_C_STO_LW 52
00118 #define ETIR_S_C_STO_QW 53
00119 #define ETIR_S_C_STO_IMMR 54
00120 #define ETIR_S_C_STO_GBL 55
00121 #define ETIR_S_C_STO_CA 56
00122 #define ETIR_S_C_STO_RB 57
00123 #define ETIR_S_C_STO_AB 58
00124 #define ETIR_S_C_STO_OFF 59
00125 #define ETIR_S_C_STO_IMM 61
00126 #define ETIR_S_C_STO_GBL_LW 62
00127 #define ETIR_S_C_STO_LP_PSB 63
00128 #define ETIR_S_C_STO_HINT_GBL 64
00129 #define ETIR_S_C_STO_HINT_PS 65
00130 #define ETIR_S_C_MAXSTOCOD 65
00131 #define ETIR_S_C_MINOPRCOD 100
00132 #define ETIR_S_C_OPR_NOP 100
00133 #define ETIR_S_C_OPR_ADD 101
00134 #define ETIR_S_C_OPR_SUB 102
00135 #define ETIR_S_C_OPR_MUL 103
00136 #define ETIR_S_C_OPR_DIV 104
00137 #define ETIR_S_C_OPR_AND 105
00138 #define ETIR_S_C_OPR_IOR 106
00139 #define ETIR_S_C_OPR_EOR 107
00140 #define ETIR_S_C_OPR_NEG 108
00141 #define ETIR_S_C_OPR_COM 109
00142 #define ETIR_S_C_OPR_INSV 110
00143 #define ETIR_S_C_OPR_ASH 111
00144 #define ETIR_S_C_OPR_USH 112
00145 #define ETIR_S_C_OPR_ROT 113
00146 #define ETIR_S_C_OPR_SEL 114
00147 #define ETIR_S_C_OPR_REDEF 115
00148 #define ETIR_S_C_OPR_DFLIT 116
00149 #define ETIR_S_C_MAXOPRCOD 116
00150 #define ETIR_S_C_MINCTLCOD 150
00151 #define ETIR_S_C_CTL_SETRB 150
00152 #define ETIR_S_C_CTL_AUGRB 151
00153 #define ETIR_S_C_CTL_DFLOC 152
00154 #define ETIR_S_C_CTL_STLOC 153
00155 #define ETIR_S_C_CTL_STKDL 154
00156 #define ETIR_S_C_MAXCTLCOD 154
00157 #define ETIR_S_C_MINSTCCOD 200
00158 #define ETIR_S_C_STC_LP 200
00159 #define ETIR_S_C_STC_LP_PSB 201
00160 #define ETIR_S_C_STC_GBL 202
00161 #define ETIR_S_C_STC_GCA 203
00162 #define ETIR_S_C_STC_PS 204
00163 #define ETIR_S_C_STC_NOP_GBL 205
00164 #define ETIR_S_C_STC_NOP_PS 206
00165 #define ETIR_S_C_STC_BSR_GBL 207
00166 #define ETIR_S_C_STC_BSR_PS 208
00167 #define ETIR_S_C_STC_LDA_GBL 209
00168 #define ETIR_S_C_STC_LDA_PS 210
00169 #define ETIR_S_C_STC_BOH_GBL 211
00170 #define ETIR_S_C_STC_BOH_PS 212
00171 #define ETIR_S_C_STC_NBH_GBL 213
00172 #define ETIR_S_C_STC_NBH_PS 214
00173 #define ETIR_S_C_MAXSTCCOD 214
00174
00175
00176
00177 #define GSD_S_K_ENTRIES 1
00178 #define GSD_S_C_ENTRIES 1
00179 #define GSD_S_C_PSC 0
00180 #define GSD_S_C_SYM 1
00181 #define GSD_S_C_EPM 2
00182 #define GSD_S_C_PRO 3
00183 #define GSD_S_C_SYMW 4
00184 #define GSD_S_C_EPMW 5
00185 #define GSD_S_C_PROW 6
00186 #define GSD_S_C_IDC 7
00187 #define GSD_S_C_ENV 8
00188 #define GSD_S_C_LSY 9
00189 #define GSD_S_C_LEPM 10
00190 #define GSD_S_C_LPRO 11
00191 #define GSD_S_C_SPSC 12
00192 #define GSD_S_C_SYMV 13
00193 #define GSD_S_C_EPMV 14
00194 #define GSD_S_C_PROV 15
00195 #define GSD_S_C_MAXRECTYP 15
00196
00197 #define EGSD_S_K_ENTRIES 2
00198 #define EGSD_S_C_ENTRIES 2
00199 #define EGSD_S_C_PSC 0
00200 #define EGSD_S_C_SYM 1
00201 #define EGSD_S_C_IDC 2
00202 #define EGSD_S_C_SPSC 5
00203 #define EGSD_S_C_SYMV 6
00204 #define EGSD_S_C_SYMM 7
00205 #define EGSD_S_C_SYMG 8
00206 #define EGSD_S_C_MAXRECTYP 8
00207
00208 #define GPS_S_M_PIC 1
00209 #define GPS_S_M_LIB 2
00210 #define GPS_S_M_OVR 4
00211 #define GPS_S_M_REL 8
00212 #define GPS_S_M_GBL 16
00213 #define GPS_S_M_SHR 32
00214 #define GPS_S_M_EXE 64
00215 #define GPS_S_M_RD 128
00216 #define GPS_S_M_WRT 256
00217 #define GPS_S_M_VEC 512
00218 #define GPS_S_K_NAME 9
00219 #define GPS_S_C_NAME 9
00220
00221 #define EGPS_S_V_PIC 0x0001
00222 #define EGPS_S_V_LIB 0x0002
00223 #define EGPS_S_V_OVR 0x0004
00224 #define EGPS_S_V_REL 0x0008
00225 #define EGPS_S_V_GBL 0x0010
00226 #define EGPS_S_V_SHR 0x0020
00227 #define EGPS_S_V_EXE 0x0040
00228 #define EGPS_S_V_RD 0x0080
00229 #define EGPS_S_V_WRT 0x0100
00230 #define EGPS_S_V_VEC 0x0200
00231 #define EGPS_S_V_NOMOD 0x0400
00232 #define EGPS_S_V_COM 0x0800
00233
00234 #define GSY_S_M_WEAK 1
00235 #define GSY_S_M_DEF 2
00236 #define GSY_S_M_UNI 4
00237 #define GSY_S_M_REL 8
00238
00239 #define EGSY_S_V_WEAK 0x0001
00240 #define EGSY_S_V_DEF 0x0002
00241 #define EGSY_S_V_UNI 0x0004
00242 #define EGSY_S_V_REL 0x0008
00243 #define EGSY_S_V_COMM 0x0010
00244 #define EGSY_S_V_VECEP 0x0020
00245 #define EGSY_S_V_NORM 0x0040
00246
00247 #define LSY_S_M_DEF 2
00248 #define LSY_S_M_REL 8
00249
00250 #define ENV_S_M_DEF 1
00251 #define ENV_S_M_NESTED 2
00252
00253
00254
00255
00256
00257
00258 #define DST_S_C_C 7
00259 #define DST_S_C_CXX 15
00260 #define DST_S_C_VERSION 153
00261 #define DST_S_C_SOURCE 155
00262 #define DST_S_C_PROLOG 162
00263 #define DST_S_C_BLKBEG 176
00264 #define DST_S_C_BLKEND 177
00265 #define DST_S_C_ENTRY 181
00266 #define DST_S_C_PSECT 184
00267 #define DST_S_C_LINE_NUM 185
00268 #define DST_S_C_LBLORLIT 186
00269 #define DST_S_C_LABEL 187
00270 #define DST_S_C_MODBEG 188
00271 #define DST_S_C_MODEND 189
00272 #define DST_S_C_RTNBEG 190
00273 #define DST_S_C_RTNEND 191
00274 #define DST_S_C_DELTA_PC_W 1
00275 #define DST_S_C_INCR_LINUM 2
00276 #define DST_S_C_INCR_LINUM_W 3
00277 #define DST_S_C_SET_LINUM_INCR 4
00278 #define DST_S_C_SET_LINUM_INCR_W 5
00279 #define DST_S_C_RESET_LINUM_INCR 6
00280 #define DST_S_C_BEG_STMT_MODE 7
00281 #define DST_S_C_END_STMT_MODE 8
00282 #define DST_S_C_SET_LINE_NUM 9
00283 #define DST_S_C_SET_PC 10
00284 #define DST_S_C_SET_PC_W 11
00285 #define DST_S_C_SET_PC_L 12
00286 #define DST_S_C_SET_STMTNUM 13
00287 #define DST_S_C_TERM 14
00288 #define DST_S_C_TERM_W 15
00289 #define DST_S_C_SET_ABS_PC 16
00290 #define DST_S_C_DELTA_PC_L 17
00291 #define DST_S_C_INCR_LINUM_L 18
00292 #define DST_S_C_SET_LINUM_B 19
00293 #define DST_S_C_SET_LINUM_L 20
00294 #define DST_S_C_TERM_L 21
00295
00296 #define DST_S_C_SRC_DECLFILE 1
00297 #define DST_S_C_SRC_SETFILE 2
00298 #define DST_S_C_SRC_SETREC_L 3
00299 #define DST_S_C_SRC_SETREC_W 4
00300 #define DST_S_C_SRC_DEFLINES_W 10
00301 #define DST_S_C_SRC_DEFLINES_B 11
00302 #define DST_S_C_SRC_FORMFEED 16
00303
00304
00305
00306 #define DBG_S_C_UCHAR 0x02
00307 #define DBG_S_C_USINT 0x03
00308 #define DBG_S_C_ULINT 0x04
00309 #define DBG_S_C_UQUAD 0x05
00310 #define DBG_S_C_SCHAR 0x06
00311 #define DBG_S_C_SSINT 0x07
00312 #define DBG_S_C_SLINT 0x08
00313 #define DBG_S_C_SQUAD 0x09
00314 #define DBG_S_C_REAL4 0x0a
00315 #define DBG_S_C_REAL8 0x0b
00316 #define DBG_S_C_COMPLX4 0x0c
00317 #define DBG_S_C_COMPLX8 0x0d
00318 #define DBG_S_C_REAL8_G 0x1b
00319 #define DBG_S_C_COMPLX8_G 0x1d
00320 #define DBG_S_C_FUNCTION_ADDR 0x17
00321 #define DBG_S_C_ADVANCED_TYPE 0xa3
00322
00323
00324 #define DBG_S_C_UBITA 0x01
00325 #define DBG_S_C_UBITU 0x22
00326 #define DBG_S_C_SBITA 0x29
00327 #define DBG_S_C_SBITU 0x2a
00328 #define DBG_S_C_CSTRING 0x2e
00329 #define DBG_S_C_WCHAR 0x38
00330
00331
00332 #define DSC_K_CLASS_S 0x01
00333 #define DSC_K_CLASS_D 0x02
00334 #define DSC_K_CLASS_A 0x04
00335 #define DSC_K_CLASS_UBS 0x0d
00336
00337
00338
00339 #define DBG_S_C_ENUM_ITEM 0xa4
00340 #define DBG_S_C_ENUM_START 0xa5
00341 #define DBG_S_C_ENUM_END 0xa6
00342 #define DBG_S_C_STRUCT_ITEM DST_K_VFLAGS_BITOFFS
00343 #define DBG_S_C_STRUCT_START 0xab
00344 #define DBG_S_C_STRUCT_END 0xac
00345 #define DST_K_TYPSPEC 0xaf
00346
00347
00348 #define DST_K_VFLAGS_NOVAL 0x80
00349 #define DST_K_VFLAGS_DSC 0xfa
00350 #define DST_K_VFLAGS_TVS 0xfb
00351 #define DST_K_VS_FOLLOWS 0xfd
00352 #define DST_K_VFLAGS_BITOFFS 0xff
00353 #define DST_K_VALKIND_LITERAL 0
00354 #define DST_K_VALKIND_ADDR 1
00355 #define DST_K_VALKIND_DESC 2
00356 #define DST_K_VALKIND_REG 3
00357 #define DST_K_REG_VAX_AP 0x0c
00358 #define DST_K_REG_VAX_FP 0x0d
00359 #define DST_K_REG_VAX_SP 0x0e
00360 #define DST_V_VALKIND 0
00361 #define DST_V_INDIRECT 2
00362 #define DST_V_DISP 3
00363 #define DST_V_REGNUM 4
00364 #define DST_M_INDIRECT (1<<DST_V_INDIRECT)
00365 #define DST_M_DISP (1<<DST_V_DISP)
00366 #define DBG_C_FUNCTION_PARAM \
00367 (DST_K_VALKIND_ADDR|DST_M_DISP|(DST_K_REG_VAX_AP<<DST_V_REGNUM))
00368 #define DBG_C_LOCAL_SYM \
00369 (DST_K_VALKIND_ADDR|DST_M_DISP|(DST_K_REG_VAX_FP<<DST_V_REGNUM))
00370
00371
00372 #define DST_K_VS_ALLOC_SPLIT 3
00373
00374
00375 #define DST_K_TS_ATOM 0x01
00376 #define DST_K_TS_DSC 0x02
00377 #define DST_K_TS_IND 0x03
00378 #define DST_K_TS_TPTR 0x04
00379 #define DST_K_TS_PTR 0x05
00380 #define DST_K_TS_ARRAY 0x07
00381 #define DST_K_TS_NOV_LENG 0x0e
00382
00383
00384
00385 #define DBG_S_C_BASIC DST_K_TS_ATOM
00386 #define DBG_S_C_BASIC_ARRAY DST_K_TS_DSC
00387 #define DBG_S_C_STRUCT DST_K_TS_IND
00388 #define DBG_S_C_POINTER DST_K_TS_TPTR
00389 #define DBG_S_C_VOID DST_K_TS_PTR
00390 #define DBG_S_C_COMPLEX_ARRAY DST_K_TS_ARRAY
00391
00392
00393
00394 #define MHD_S_C_MHD 0
00395 #define MHD_S_C_LNM 1
00396 #define MHD_S_C_SRC 2
00397 #define MHD_S_C_TTL 3
00398 #define MHD_S_C_CPR 4
00399 #define MHD_S_C_MTC 5
00400 #define MHD_S_C_GTX 6
00401 #define MHD_S_C_MAXHDRTYP 6
00402
00403 #define EMH_S_C_MHD 0
00404 #define EMH_S_C_LNM 1
00405 #define EMH_S_C_SRC 2
00406 #define EMH_S_C_TTL 3
00407 #define EMH_S_C_CPR 4
00408 #define EMH_S_C_MTC 5
00409 #define EMH_S_C_GTX 6
00410 #define EMH_S_C_MAXHDRTYP 6
00411
00412
00413
00414 extern asymbol *_bfd_vms_make_empty_symbol PARAMS ((bfd *abfd));
00415
00416
00417
00418 extern int _bfd_vms_slurp_gsd PARAMS ((bfd *abfd, int objtype));
00419 extern int _bfd_vms_write_gsd PARAMS ((bfd *abfd, int objtype));
00420
00421
00422
00423 extern int _bfd_vms_slurp_hdr PARAMS ((bfd *abfd, int objtype));
00424 extern int _bfd_vms_write_hdr PARAMS ((bfd *abfd, int objtype));
00425 extern int _bfd_vms_slurp_eom PARAMS ((bfd *abfd, int objtype));
00426 extern int _bfd_vms_write_eom PARAMS ((bfd *abfd, int objtype));
00427
00428
00429
00430 extern int _bfd_vms_slurp_tir PARAMS ((bfd *abfd, int objtype));
00431 extern int _bfd_vms_slurp_dbg PARAMS ((bfd *abfd, int objtype));
00432 extern int _bfd_vms_slurp_tbt PARAMS ((bfd *abfd, int objtype));
00433 extern int _bfd_vms_slurp_lnk PARAMS ((bfd *abfd, int objtype));
00434
00435 extern int _bfd_vms_write_tir PARAMS ((bfd *abfd, int objtype));
00436 extern int _bfd_vms_write_tbt PARAMS ((bfd *abfd, int objtype));
00437 extern int _bfd_vms_write_dbg PARAMS ((bfd *abfd, int objtype));
00438
00439
00440 #define ALPHA_R_IGNORE 0
00441 #define ALPHA_R_REFQUAD 1
00442 #define ALPHA_R_BRADDR 2
00443 #define ALPHA_R_HINT 3
00444 #define ALPHA_R_SREL16 4
00445 #define ALPHA_R_SREL32 5
00446 #define ALPHA_R_SREL64 6
00447 #define ALPHA_R_OP_PUSH 7
00448 #define ALPHA_R_OP_STORE 8
00449 #define ALPHA_R_OP_PSUB 9
00450 #define ALPHA_R_OP_PRSHIFT 10
00451 #define ALPHA_R_LINKAGE 11
00452 #define ALPHA_R_REFLONG 12
00453 #define ALPHA_R_CODEADDR 13
00454
00455
00456
00457 #define OBJ_S_C_HDR 0
00458 #define OBJ_S_C_GSD 1
00459 #define OBJ_S_C_TIR 2
00460 #define OBJ_S_C_EOM 3
00461 #define OBJ_S_C_DBG 4
00462 #define OBJ_S_C_TBT 5
00463 #define OBJ_S_C_LNK 6
00464 #define OBJ_S_C_EOMW 7
00465 #define OBJ_S_C_MAXRECTYP 7
00466 #define EOBJ_S_C_EMH 8
00467 #define EOBJ_S_C_EEOM 9
00468 #define EOBJ_S_C_EGSD 10
00469 #define EOBJ_S_C_ETIR 11
00470 #define EOBJ_S_C_EDBG 12
00471 #define EOBJ_S_C_ETBT 13
00472 #define EOBJ_S_C_MAXRECTYP 13
00473 #define OBJ_S_K_SUBTYP 1
00474 #define OBJ_S_C_SUBTYP 1
00475 #define EOBJ_S_K_SUBTYP 4
00476 #define EOBJ_S_C_SUBTYP 4
00477 #define OBJ_S_C_MAXRECSIZ 2048
00478 #define EOBJ_S_C_MAXRECSIZ 8192
00479 #define OBJ_S_C_STRLVL 0
00480 #define EOBJ_S_C_STRLVL 2
00481 #define OBJ_S_C_SYMSIZ 31
00482 #define EOBJ_S_C_SYMSIZ 64
00483 #define EOBJ_S_C_SECSIZ 31
00484 #define OBJ_S_C_STOREPLIM -1
00485 #define EOBJ_S_C_STOREPLIM -1
00486 #define OBJ_S_C_PSCALILIM 9
00487 #define EOBJ_S_C_PSCALILIM 16
00488
00489 #define EVAX_OFFSET 256
00490
00491
00492 #if __GNUC__
00493 typedef unsigned long long uquad;
00494 #else
00495 typedef unsigned long uquad;
00496 #endif
00497
00498 #define MAX_OUTREC_SIZE 4096
00499 #define MIN_OUTREC_LUFT 64
00500
00501 typedef struct _vms_section {
00502 unsigned char *contents;
00503 bfd_vma offset;
00504 bfd_size_type size;
00505 struct _vms_section *next;
00506 } vms_section;
00507
00508 extern vms_section *_bfd_get_vms_section PARAMS ((bfd *abfd, int index));
00509
00510 typedef struct _vms_reloc {
00511 struct _vms_reloc *next;
00512 arelent *reloc;
00513 asection *section;
00514 } vms_reloc;
00515
00516
00517
00518 struct hdr_struc {
00519 int hdr_b_strlvl;
00520 long hdr_l_arch1;
00521 long hdr_l_arch2;
00522 long hdr_l_recsiz;
00523 char *hdr_t_name;
00524 char *hdr_t_version;
00525 char *hdr_t_date;
00526 char *hdr_c_lnm;
00527 char *hdr_c_src;
00528 char *hdr_c_ttl;
00529 };
00530
00531
00532
00533 struct eom_struc {
00534 long eom_l_total_lps;
00535 unsigned char eom_b_comcod;
00536 bfd_boolean eom_has_transfer;
00537 unsigned char eom_b_tfrflg;
00538 long eom_l_psindx;
00539 long eom_l_tfradr;
00540 };
00541
00542 enum file_format_enum { FF_UNKNOWN, FF_FOREIGN, FF_NATIVE, FF_VAX };
00543
00544 typedef struct vms_symbol_struct {
00545 struct bfd_hash_entry bfd_hash;
00546 asymbol *symbol;
00547 } vms_symbol_entry;
00548
00549
00550
00551 struct stack_struct {
00552 uquad value;
00553 int psect;
00554 };
00555 #define STACKSIZE 8192
00556
00557
00558
00559 struct location_struct {
00560 unsigned long value;
00561 int psect;
00562 };
00563 #define LOCATION_SAVE_SIZE 32
00564
00565 #define VMS_SECTION_COUNT 1024
00566
00567 struct vms_private_data_struct {
00568 int is_vax;
00569 bfd_boolean fixup_done;
00570
00571
00572 unsigned char *vms_buf;
00573 int buf_size;
00574 unsigned char *vms_rec;
00575 int rec_length;
00576 int rec_size;
00577 int rec_type;
00578 enum file_format_enum file_format;
00579
00580 struct hdr_struc hdr_data;
00581 struct eom_struc eom_data;
00582 unsigned int section_count;
00583 asection **sections;
00584 int gsd_sym_count;
00585 asymbol **symbols;
00586 struct proc_value *procedure;
00587
00588 struct stack_struct *stack;
00589 int stackptr;
00590
00591 vms_section *vms_section_table[VMS_SECTION_COUNT];
00592
00593 struct bfd_hash_table *vms_symbol_table;
00594 struct bfd_symbol **symcache;
00595 int symnum;
00596
00597 struct location_struct *location_stack;
00598
00599 asection *image_section;
00600 unsigned char *image_ptr;
00601
00602 unsigned char pdsc[8];
00603
00604
00605
00606 unsigned char *output_buf;
00607 int push_level;
00608 int pushed_size;
00609 int length_pos;
00610 int output_size;
00611 int output_alignment;
00612
00613
00614
00615
00616 int vms_linkage_index;
00617
00618
00619 int flag_hash_long_names;
00620 int flag_show_after_trunc;
00621 };
00622
00623 #define PRIV(name) ((struct vms_private_data_struct *)abfd->tdata.any)->name
00624
00625 #define SECTION_NAME_TEMPLATE "__SEC__%d"
00626
00627 #if VMS_DEBUG
00628 extern void _bfd_vms_debug PARAMS((int level, char *format, ...));
00629 extern void _bfd_hexdump
00630 PARAMS ((int level, unsigned char *ptr, int size, int offset));
00631
00632 #define vms_debug _bfd_vms_debug
00633 #endif
00634
00635 extern struct bfd_hash_entry *_bfd_vms_hash_newfunc
00636 PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
00637 const char *string));
00638 extern void _bfd_vms_get_header_values
00639 PARAMS ((bfd *abfd, unsigned char *buf, int *type, int *length));
00640 extern int _bfd_vms_get_record PARAMS ((bfd *abfd));
00641 extern int _bfd_vms_next_record PARAMS ((bfd *abfd));
00642
00643 extern char *_bfd_vms_save_sized_string PARAMS ((unsigned char *str, int size));
00644 extern char *_bfd_vms_save_counted_string PARAMS ((unsigned char *ptr));
00645 extern void _bfd_vms_push PARAMS ((bfd *abfd, uquad val, int psect));
00646 extern uquad _bfd_vms_pop PARAMS ((bfd *abfd, int *psect));
00647
00648 extern bfd_boolean _bfd_save_vms_section
00649 PARAMS ((bfd *abfd, asection *section, const PTR data, file_ptr offset,
00650 bfd_size_type count));
00651 extern void _bfd_vms_output_begin
00652 PARAMS ((bfd *abfd, int rectype, int rechead));
00653 extern void _bfd_vms_output_alignment PARAMS ((bfd *abfd, int alignto));
00654 extern void _bfd_vms_output_push PARAMS ((bfd *abfd));
00655 extern void _bfd_vms_output_pop PARAMS ((bfd *abfd));
00656 extern void _bfd_vms_output_flush PARAMS ((bfd *abfd));
00657 extern void _bfd_vms_output_end PARAMS ((bfd *abfd));
00658 extern int _bfd_vms_output_check PARAMS ((bfd *abfd, int size));
00659 extern void _bfd_vms_output_byte PARAMS ((bfd *abfd, unsigned int value));
00660 extern void _bfd_vms_output_short PARAMS ((bfd *abfd, unsigned int value));
00661 extern void _bfd_vms_output_long PARAMS ((bfd *abfd, unsigned long value));
00662 extern void _bfd_vms_output_quad PARAMS ((bfd *abfd, uquad value));
00663 extern void _bfd_vms_output_counted PARAMS ((bfd *abfd, char *value));
00664 extern void _bfd_vms_output_dump PARAMS ((bfd *abfd, unsigned char *data,
00665 int length));
00666 extern void _bfd_vms_output_fill PARAMS ((bfd *abfd, int value, int length));
00667 extern char *_bfd_vms_length_hash_symbol PARAMS ((bfd *abfd, const char *in, int maxlen));
00668
00669 extern vms_symbol_entry *_bfd_vms_enter_symbol PARAMS ((bfd *abfd, char *name));
00670
00671 #endif