Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Enumerations | Functions
vms.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _vms_section
struct  _vms_reloc
struct  hdr_struc
struct  eom_struc
struct  vms_symbol_struct
struct  stack_struct
struct  location_struct
struct  vms_private_data_struct

Defines

#define TIR_S_C_STA_GBL   0
#define TIR_S_C_STA_SB   1
#define TIR_S_C_STA_SW   2
#define TIR_S_C_STA_LW   3
#define TIR_S_C_STA_PB   4
#define TIR_S_C_STA_PW   5
#define TIR_S_C_STA_PL   6
#define TIR_S_C_STA_UB   7
#define TIR_S_C_STA_UW   8
#define TIR_S_C_STA_BFI   9
#define TIR_S_C_STA_WFI   10
#define TIR_S_C_STA_LFI   11
#define TIR_S_C_STA_EPM   12
#define TIR_S_C_STA_CKARG   13
#define TIR_S_C_STA_WPB   14
#define TIR_S_C_STA_WPW   15
#define TIR_S_C_STA_WPL   16
#define TIR_S_C_STA_LSY   17
#define TIR_S_C_STA_LIT   18
#define TIR_S_C_STA_LEPM   19
#define TIR_S_C_MAXSTACOD   19
#define TIR_S_C_MINSTOCOD   20
#define TIR_S_C_STO_SB   20
#define TIR_S_C_STO_SW   21
#define TIR_S_C_STO_L   22
#define TIR_S_C_STO_LW   22
#define TIR_S_C_STO_BD   23
#define TIR_S_C_STO_WD   24
#define TIR_S_C_STO_LD   25
#define TIR_S_C_STO_LI   26
#define TIR_S_C_STO_PIDR   27
#define TIR_S_C_STO_PICR   28
#define TIR_S_C_STO_RSB   29
#define TIR_S_C_STO_RSW   30
#define TIR_S_C_STO_RL   31
#define TIR_S_C_STO_VPS   32
#define TIR_S_C_STO_USB   33
#define TIR_S_C_STO_USW   34
#define TIR_S_C_STO_RUB   35
#define TIR_S_C_STO_RUW   36
#define TIR_S_C_STO_B   37
#define TIR_S_C_STO_W   38
#define TIR_S_C_STO_RB   39
#define TIR_S_C_STO_RW   40
#define TIR_S_C_STO_RIVB   41
#define TIR_S_C_STO_PIRR   42
#define TIR_S_C_MAXSTOCOD   42
#define TIR_S_C_MINOPRCOD   50
#define TIR_S_C_OPR_NOP   50
#define TIR_S_C_OPR_ADD   51
#define TIR_S_C_OPR_SUB   52
#define TIR_S_C_OPR_MUL   53
#define TIR_S_C_OPR_DIV   54
#define TIR_S_C_OPR_AND   55
#define TIR_S_C_OPR_IOR   56
#define TIR_S_C_OPR_EOR   57
#define TIR_S_C_OPR_NEG   58
#define TIR_S_C_OPR_COM   59
#define TIR_S_C_OPR_INSV   60
#define TIR_S_C_OPR_ASH   61
#define TIR_S_C_OPR_USH   62
#define TIR_S_C_OPR_ROT   63
#define TIR_S_C_OPR_SEL   64
#define TIR_S_C_OPR_REDEF   65
#define TIR_S_C_OPR_DFLIT   66
#define TIR_S_C_MAXOPRCOD   66
#define TIR_S_C_MINCTLCOD   80
#define TIR_S_C_CTL_SETRB   80
#define TIR_S_C_CTL_AUGRB   81
#define TIR_S_C_CTL_DFLOC   82
#define TIR_S_C_CTL_STLOC   83
#define TIR_S_C_CTL_STKDL   84
#define TIR_S_C_MAXCTLCOD   84
#define ETIR_S_C_MINSTACOD   0 /* Minimum store code. */
#define ETIR_S_C_STA_GBL   0 /* Stack global symbol value. */
#define ETIR_S_C_STA_LW   1 /* Stack longword. */
#define ETIR_S_C_STA_QW   2 /* Stack quadword. */
#define ETIR_S_C_STA_PQ   3 /* Stack psect base plus quadword offset. */
#define ETIR_S_C_STA_LI   4 /* Stack literal. */
#define ETIR_S_C_STA_MOD   5 /* Stack module. */
#define ETIR_S_C_STA_CKARG   6 /* Check Arguments. */
#define ETIR_S_C_MAXSTACOD   6 /* Maximum stack code. */
#define ETIR_S_C_MINSTOCOD   50 /* Minimum store code. */
#define ETIR_S_C_STO_B   50 /* Store byte. */
#define ETIR_S_C_STO_W   51 /* Store word. */
#define ETIR_S_C_STO_LW   52 /* Store longword. */
#define ETIR_S_C_STO_QW   53 /* Store quadword. */
#define ETIR_S_C_STO_IMMR   54 /* Store immediate Repeated. */
#define ETIR_S_C_STO_GBL   55 /* Store global. */
#define ETIR_S_C_STO_CA   56 /* Store code address. */
#define ETIR_S_C_STO_RB   57 /* Store relative branch. */
#define ETIR_S_C_STO_AB   58 /* Store absolute branch. */
#define ETIR_S_C_STO_OFF   59 /* Store offset within psect. */
#define ETIR_S_C_STO_IMM   61 /* Store immediate. */
#define ETIR_S_C_STO_GBL_LW   62 /* Store global Longword. */
#define ETIR_S_C_STO_LP_PSB   63 /* STO_LP_PSB not valid in level 2 use STC_LP_PSB. */
#define ETIR_S_C_STO_HINT_GBL   64 /* Store 14 bit HINT at global address. */
#define ETIR_S_C_STO_HINT_PS   65 /* Store 14 bit HINT at psect + offset */
#define ETIR_S_C_MAXSTOCOD   65 /* Maximum store code. */
#define ETIR_S_C_MINOPRCOD   100 /* Minimum operate code. */
#define ETIR_S_C_OPR_NOP   100 /* No-op. */
#define ETIR_S_C_OPR_ADD   101 /* Add. */
#define ETIR_S_C_OPR_SUB   102 /* Subtract. */
#define ETIR_S_C_OPR_MUL   103 /* Multiply. */
#define ETIR_S_C_OPR_DIV   104 /* Divide. */
#define ETIR_S_C_OPR_AND   105 /* Logical AND. */
#define ETIR_S_C_OPR_IOR   106 /* Logical inclusive OR. */
#define ETIR_S_C_OPR_EOR   107 /* Logical exclusive OR. */
#define ETIR_S_C_OPR_NEG   108 /* Negate. */
#define ETIR_S_C_OPR_COM   109 /* Complement. */
#define ETIR_S_C_OPR_INSV   110 /* Insert bit field. */
#define ETIR_S_C_OPR_ASH   111 /* Arithmetic shift. */
#define ETIR_S_C_OPR_USH   112 /* Unsigned shift. */
#define ETIR_S_C_OPR_ROT   113 /* Rotate. */
#define ETIR_S_C_OPR_SEL   114 /* Select one of three longwords on top of stack. */
#define ETIR_S_C_OPR_REDEF   115 /* Redefine this symbol after pass 2. */
#define ETIR_S_C_OPR_DFLIT   116 /* Define a literal. */
#define ETIR_S_C_MAXOPRCOD   116 /* Maximum operate code. */
#define ETIR_S_C_MINCTLCOD   150 /* Minimum control code. */
#define ETIR_S_C_CTL_SETRB   150 /* Set relocation base. */
#define ETIR_S_C_CTL_AUGRB   151 /* Augment relocation base. */
#define ETIR_S_C_CTL_DFLOC   152 /* Define debug location. */
#define ETIR_S_C_CTL_STLOC   153 /* Set debug location. */
#define ETIR_S_C_CTL_STKDL   154 /* Stack debug location. */
#define ETIR_S_C_MAXCTLCOD   154 /* Maximum control code. */
#define ETIR_S_C_MINSTCCOD   200 /* Minimum store-conditional code. */
#define ETIR_S_C_STC_LP   200 /* Store-conditional Linkage Pair. */
#define ETIR_S_C_STC_LP_PSB   201 /* Store-conditional Linkage Pair with Procedure Signature. */
#define ETIR_S_C_STC_GBL   202 /* Store-conditional Address at global address. */
#define ETIR_S_C_STC_GCA   203 /* Store-conditional Code Address at global address. */
#define ETIR_S_C_STC_PS   204 /* Store-conditional Address at psect + offset. */
#define ETIR_S_C_STC_NOP_GBL   205 /* Store-conditional NOP at address of global. */
#define ETIR_S_C_STC_NOP_PS   206 /* Store-conditional NOP at pect + offset. */
#define ETIR_S_C_STC_BSR_GBL   207 /* Store-conditional BSR at global address. */
#define ETIR_S_C_STC_BSR_PS   208 /* Store-conditional BSR at pect + offset. */
#define ETIR_S_C_STC_LDA_GBL   209 /* Store-conditional LDA at global address. */
#define ETIR_S_C_STC_LDA_PS   210 /* Store-conditional LDA at psect + offset. */
#define ETIR_S_C_STC_BOH_GBL   211 /* Store-conditional BSR or Hint at global address. */
#define ETIR_S_C_STC_BOH_PS   212 /* Store-conditional BSR or Hint at pect + offset. */
#define ETIR_S_C_STC_NBH_GBL   213 /* Store-conditional NOP,BSR or HINT at global address. */
#define ETIR_S_C_STC_NBH_PS   214 /* Store-conditional NOP,BSR or HINT at psect + offset. */
#define ETIR_S_C_MAXSTCCOD   214 /* Maximum store-conditional code. */
#define GSD_S_K_ENTRIES   1
#define GSD_S_C_ENTRIES   1
#define GSD_S_C_PSC   0
#define GSD_S_C_SYM   1
#define GSD_S_C_EPM   2
#define GSD_S_C_PRO   3
#define GSD_S_C_SYMW   4
#define GSD_S_C_EPMW   5
#define GSD_S_C_PROW   6
#define GSD_S_C_IDC   7
#define GSD_S_C_ENV   8
#define GSD_S_C_LSY   9
#define GSD_S_C_LEPM   10
#define GSD_S_C_LPRO   11
#define GSD_S_C_SPSC   12
#define GSD_S_C_SYMV   13
#define GSD_S_C_EPMV   14
#define GSD_S_C_PROV   15
#define GSD_S_C_MAXRECTYP   15
#define EGSD_S_K_ENTRIES   2 /* Offset to first entry in record. */
#define EGSD_S_C_ENTRIES   2 /* Offset to first entry in record. */
#define EGSD_S_C_PSC   0 /* Psect definition. */
#define EGSD_S_C_SYM   1 /* Symbol specification. */
#define EGSD_S_C_IDC   2 /* Random entity check. */
#define EGSD_S_C_SPSC   5 /* Shareable image psect definition. */
#define EGSD_S_C_SYMV   6 /* Vectored (dual-valued) versions of SYM. */
#define EGSD_S_C_SYMM   7 /* Masked versions of SYM. */
#define EGSD_S_C_SYMG   8 /* EGST - gst version of SYM. */
#define EGSD_S_C_MAXRECTYP   8 /* Maximum entry type defined. */
#define GPS_S_M_PIC   1
#define GPS_S_M_LIB   2
#define GPS_S_M_OVR   4
#define GPS_S_M_REL   8
#define GPS_S_M_GBL   16
#define GPS_S_M_SHR   32
#define GPS_S_M_EXE   64
#define GPS_S_M_RD   128
#define GPS_S_M_WRT   256
#define GPS_S_M_VEC   512
#define GPS_S_K_NAME   9
#define GPS_S_C_NAME   9
#define EGPS_S_V_PIC   0x0001
#define EGPS_S_V_LIB   0x0002
#define EGPS_S_V_OVR   0x0004
#define EGPS_S_V_REL   0x0008
#define EGPS_S_V_GBL   0x0010
#define EGPS_S_V_SHR   0x0020
#define EGPS_S_V_EXE   0x0040
#define EGPS_S_V_RD   0x0080
#define EGPS_S_V_WRT   0x0100
#define EGPS_S_V_VEC   0x0200
#define EGPS_S_V_NOMOD   0x0400
#define EGPS_S_V_COM   0x0800
#define GSY_S_M_WEAK   1
#define GSY_S_M_DEF   2
#define GSY_S_M_UNI   4
#define GSY_S_M_REL   8
#define EGSY_S_V_WEAK   0x0001
#define EGSY_S_V_DEF   0x0002
#define EGSY_S_V_UNI   0x0004
#define EGSY_S_V_REL   0x0008
#define EGSY_S_V_COMM   0x0010
#define EGSY_S_V_VECEP   0x0020
#define EGSY_S_V_NORM   0x0040
#define LSY_S_M_DEF   2
#define LSY_S_M_REL   8
#define ENV_S_M_DEF   1
#define ENV_S_M_NESTED   2
#define DST_S_C_C   7 /* Language == "C". */
#define DST_S_C_CXX   15 /* Language == "C++". */
#define DST_S_C_VERSION   153
#define DST_S_C_SOURCE   155 /* Source file. */
#define DST_S_C_PROLOG   162
#define DST_S_C_BLKBEG   176 /* Beginning of block. */
#define DST_S_C_BLKEND   177 /* End of block. */
#define DST_S_C_ENTRY   181
#define DST_S_C_PSECT   184
#define DST_S_C_LINE_NUM   185 /* Line Number. */
#define DST_S_C_LBLORLIT   186
#define DST_S_C_LABEL   187
#define DST_S_C_MODBEG   188 /* Beginning of module. */
#define DST_S_C_MODEND   189 /* End of module. */
#define DST_S_C_RTNBEG   190 /* Beginning of routine.*/
#define DST_S_C_RTNEND   191 /* End of routine. */
#define DST_S_C_DELTA_PC_W   1 /* Incr PC. */
#define DST_S_C_INCR_LINUM   2 /* Incr Line #. */
#define DST_S_C_INCR_LINUM_W   3 /* Incr Line #. */
#define DST_S_C_SET_LINUM_INCR   4
#define DST_S_C_SET_LINUM_INCR_W   5
#define DST_S_C_RESET_LINUM_INCR   6
#define DST_S_C_BEG_STMT_MODE   7
#define DST_S_C_END_STMT_MODE   8
#define DST_S_C_SET_LINE_NUM   9 /* Set Line #. */
#define DST_S_C_SET_PC   10
#define DST_S_C_SET_PC_W   11
#define DST_S_C_SET_PC_L   12
#define DST_S_C_SET_STMTNUM   13
#define DST_S_C_TERM   14 /* End of lines. */
#define DST_S_C_TERM_W   15 /* End of lines. */
#define DST_S_C_SET_ABS_PC   16 /* Set PC. */
#define DST_S_C_DELTA_PC_L   17 /* Incr PC. */
#define DST_S_C_INCR_LINUM_L   18 /* Incr Line #. */
#define DST_S_C_SET_LINUM_B   19 /* Set Line #. */
#define DST_S_C_SET_LINUM_L   20 /* Set Line #. */
#define DST_S_C_TERM_L   21 /* End of lines. */
#define DST_S_C_SRC_DECLFILE   1 /* Declare source file. */
#define DST_S_C_SRC_SETFILE   2 /* Set source file. */
#define DST_S_C_SRC_SETREC_L   3 /* Set record, longword value. */
#define DST_S_C_SRC_SETREC_W   4 /* Set record, word value. */
#define DST_S_C_SRC_DEFLINES_W   10 /* # of line, word counter. */
#define DST_S_C_SRC_DEFLINES_B   11 /* # of line, byte counter. */
#define DST_S_C_SRC_FORMFEED   16 /* ^L counts as a record. */
#define DBG_S_C_UCHAR   0x02
#define DBG_S_C_USINT   0x03
#define DBG_S_C_ULINT   0x04
#define DBG_S_C_UQUAD   0x05
#define DBG_S_C_SCHAR   0x06
#define DBG_S_C_SSINT   0x07
#define DBG_S_C_SLINT   0x08
#define DBG_S_C_SQUAD   0x09
#define DBG_S_C_REAL4   0x0a
#define DBG_S_C_REAL8   0x0b /* D_float double. */
#define DBG_S_C_COMPLX4   0x0c /* 2xF_float complex float. */
#define DBG_S_C_COMPLX8   0x0d /* 2xD_float complex double. */
#define DBG_S_C_REAL8_G   0x1b /* G_float double. */
#define DBG_S_C_COMPLX8_G   0x1d /* 2xG_float complex double. */
#define DBG_S_C_FUNCTION_ADDR   0x17
#define DBG_S_C_ADVANCED_TYPE   0xa3
#define DBG_S_C_UBITA   0x01 /* Unsigned, aligned bit field. */
#define DBG_S_C_UBITU   0x22 /* Unsigned, unaligned bit field. */
#define DBG_S_C_SBITA   0x29 /* Signed, aligned bit field. */
#define DBG_S_C_SBITU   0x2a /* Signed, unaligned bit field. */
#define DBG_S_C_CSTRING   0x2e /* Asciz ('\0' terminated) string. */
#define DBG_S_C_WCHAR   0x38 /* Wchar_t. */
#define DSC_K_CLASS_S   0x01 /* Static (fixed length). */
#define DSC_K_CLASS_D   0x02 /* Dynamic string (not via malloc!). */
#define DSC_K_CLASS_A   0x04 /* Array. */
#define DSC_K_CLASS_UBS   0x0d /* Unaligned bit string. */
#define DBG_S_C_ENUM_ITEM   0xa4
#define DBG_S_C_ENUM_START   0xa5
#define DBG_S_C_ENUM_END   0xa6
#define DBG_S_C_STRUCT_ITEM   DST_K_VFLAGS_BITOFFS /* 0xff */
#define DBG_S_C_STRUCT_START   0xab
#define DBG_S_C_STRUCT_END   0xac
#define DST_K_TYPSPEC   0xaf /* Type specification. */
#define DST_K_VFLAGS_NOVAL   0x80 /* Struct definition only. */
#define DST_K_VFLAGS_DSC   0xfa /* Descriptor used. */
#define DST_K_VFLAGS_TVS   0xfb /* Trailing value specified. */
#define DST_K_VS_FOLLOWS   0xfd /* Value spec follows. */
#define DST_K_VFLAGS_BITOFFS   0xff /* Value contains bit offset. */
#define DST_K_VALKIND_LITERAL   0
#define DST_K_VALKIND_ADDR   1
#define DST_K_VALKIND_DESC   2
#define DST_K_VALKIND_REG   3
#define DST_K_REG_VAX_AP   0x0c /* R12. */
#define DST_K_REG_VAX_FP   0x0d /* R13. */
#define DST_K_REG_VAX_SP   0x0e /* R14. */
#define DST_V_VALKIND   0 /* Offset of valkind field. */
#define DST_V_INDIRECT   2 /* Offset to indirect bit. */
#define DST_V_DISP   3 /* Offset to displacement bit. */
#define DST_V_REGNUM   4 /* Offset to register number. */
#define DST_M_INDIRECT   (1<<DST_V_INDIRECT)
#define DST_M_DISP   (1<<DST_V_DISP)
#define DBG_C_FUNCTION_PARAM
#define DBG_C_LOCAL_SYM
#define DST_K_VS_ALLOC_SPLIT   3 /* Split lifetime. */
#define DST_K_TS_ATOM   0x01 /* Atomic type specification. */
#define DST_K_TS_DSC   0x02 /* Descriptor type spec. */
#define DST_K_TS_IND   0x03 /* Indirect type specification. */
#define DST_K_TS_TPTR   0x04 /* Typed pointer type spec. */
#define DST_K_TS_PTR   0x05 /* Pointer type spec. */
#define DST_K_TS_ARRAY   0x07 /* Array type spec. */
#define DST_K_TS_NOV_LENG   0x0e /* Novel length type spec. */
#define DBG_S_C_BASIC   DST_K_TS_ATOM
#define DBG_S_C_BASIC_ARRAY   DST_K_TS_DSC
#define DBG_S_C_STRUCT   DST_K_TS_IND
#define DBG_S_C_POINTER   DST_K_TS_TPTR
#define DBG_S_C_VOID   DST_K_TS_PTR
#define DBG_S_C_COMPLEX_ARRAY   DST_K_TS_ARRAY
#define MHD_S_C_MHD   0
#define MHD_S_C_LNM   1
#define MHD_S_C_SRC   2
#define MHD_S_C_TTL   3
#define MHD_S_C_CPR   4
#define MHD_S_C_MTC   5
#define MHD_S_C_GTX   6
#define MHD_S_C_MAXHDRTYP   6
#define EMH_S_C_MHD   0 /* Main header record. */
#define EMH_S_C_LNM   1 /* Language name and version. */
#define EMH_S_C_SRC   2 /* Source file specification. */
#define EMH_S_C_TTL   3 /* Title text of module. */
#define EMH_S_C_CPR   4 /* Copyright notice. */
#define EMH_S_C_MTC   5 /* Maintenance status. */
#define EMH_S_C_GTX   6 /* General text. */
#define EMH_S_C_MAXHDRTYP   6 /* Maximum allowable type. */
#define ALPHA_R_IGNORE   0
#define ALPHA_R_REFQUAD   1
#define ALPHA_R_BRADDR   2
#define ALPHA_R_HINT   3
#define ALPHA_R_SREL16   4
#define ALPHA_R_SREL32   5
#define ALPHA_R_SREL64   6
#define ALPHA_R_OP_PUSH   7
#define ALPHA_R_OP_STORE   8
#define ALPHA_R_OP_PSUB   9
#define ALPHA_R_OP_PRSHIFT   10
#define ALPHA_R_LINKAGE   11
#define ALPHA_R_REFLONG   12
#define ALPHA_R_CODEADDR   13
#define OBJ_S_C_HDR   0 /* VAX moule header record. */
#define OBJ_S_C_GSD   1 /* VAX glbal symbol definition record. */
#define OBJ_S_C_TIR   2 /* VAX tet information record. */
#define OBJ_S_C_EOM   3 /* VAX en of module record. */
#define OBJ_S_C_DBG   4 /* VAX Deugger information record. */
#define OBJ_S_C_TBT   5 /* VAX Trceback information record. */
#define OBJ_S_C_LNK   6 /* VAX liker options record. */
#define OBJ_S_C_EOMW   7 /* VAX en of module word-psect record. */
#define OBJ_S_C_MAXRECTYP   7 /* VAX Lat assigned record type. */
#define EOBJ_S_C_EMH   8 /* EVAX mdule header record. */
#define EOBJ_S_C_EEOM   9 /* EVAX ed of module record. */
#define EOBJ_S_C_EGSD   10 /* EVAX gobal symbol definition record.*/
#define EOBJ_S_C_ETIR   11 /* EVAX txt information record. */
#define EOBJ_S_C_EDBG   12 /* EVAX Dbugger information record. */
#define EOBJ_S_C_ETBT   13 /* EVAX Taceback information record. */
#define EOBJ_S_C_MAXRECTYP   13 /* EVAX Lst assigned record type. */
#define OBJ_S_K_SUBTYP   1
#define OBJ_S_C_SUBTYP   1
#define EOBJ_S_K_SUBTYP   4
#define EOBJ_S_C_SUBTYP   4
#define OBJ_S_C_MAXRECSIZ   2048 /* Maximu legal record size. */
#define EOBJ_S_C_MAXRECSIZ   8192 /* Maximu legal record size. */
#define OBJ_S_C_STRLVL   0 /* Structre level. */
#define EOBJ_S_C_STRLVL   2 /* Structre level. */
#define OBJ_S_C_SYMSIZ   31 /* Maximu symbol length. */
#define EOBJ_S_C_SYMSIZ   64 /* Maximu symbol length. */
#define EOBJ_S_C_SECSIZ   31 /* Maximu section name length. */
#define OBJ_S_C_STOREPLIM   -1 /* Maximu repeat count on store commands. */
#define EOBJ_S_C_STOREPLIM   -1 /* Maximu repeat count on store commands. */
#define OBJ_S_C_PSCALILIM   9 /* Maximu p-sect alignment. */
#define EOBJ_S_C_PSCALILIM   16 /* Maximu p-sect alignment. */
#define EVAX_OFFSET   256 /* Type ofset for EVAX codes in switch. */
#define MAX_OUTREC_SIZE   4096
#define MIN_OUTREC_LUFT   64
#define STACKSIZE   8192
#define LOCATION_SAVE_SIZE   32
#define VMS_SECTION_COUNT   1024
#define PRIV(name)   ((struct vms_private_data_struct *) abfd->tdata.any)->name
#define SECTION_NAME_TEMPLATE   "__SEC__%d"

Typedefs

typedef unsigned long uquad
typedef struct _vms_section vms_section
typedef struct _vms_reloc vms_reloc
typedef struct vms_symbol_struct vms_symbol_entry

Enumerations

enum  file_format_enum { FF_UNKNOWN, FF_FOREIGN, FF_NATIVE, FF_VAX }

Functions

asymbol_bfd_vms_make_empty_symbol (bfd *)
int _bfd_vms_slurp_gsd (bfd *, int)
int _bfd_vms_write_gsd (bfd *, int)
int _bfd_vms_slurp_hdr (bfd *, int)
int _bfd_vms_write_hdr (bfd *, int)
int _bfd_vms_slurp_eom (bfd *, int)
int _bfd_vms_write_eom (bfd *, int)
int _bfd_vms_slurp_tir (bfd *, int)
int _bfd_vms_slurp_dbg (bfd *, int)
int _bfd_vms_slurp_tbt (bfd *, int)
int _bfd_vms_slurp_lnk (bfd *, int)
int _bfd_vms_write_tir (bfd *, int)
int _bfd_vms_write_tbt (bfd *, int)
int _bfd_vms_write_dbg (bfd *, int)
vms_section_bfd_get_vms_section (bfd *, int)
struct bfd_hash_entry_bfd_vms_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *)
void _bfd_vms_get_header_values (bfd *, unsigned char *, int *, int *)
int _bfd_vms_get_record (bfd *abf)
int _bfd_vms_next_record (bfd *abf)
char * _bfd_vms_save_sized_string (unsigned char *, int)
char * _bfd_vms_save_counted_string (unsigned char *)
void _bfd_vms_push (bfd *, uquad, int)
uquad _bfd_vms_pop (bfd *, int *)
bfd_boolean _bfd_save_vms_section (bfd *, asection *, const void *, file_ptr, bfd_size_type)
void _bfd_vms_output_begin (bfd *, int, int)
void _bfd_vms_output_alignment (bfd *, int)
void _bfd_vms_output_push (bfd *)
void _bfd_vms_output_pop (bfd *)
void _bfd_vms_output_flush (bfd *)
void _bfd_vms_output_end (bfd *)
int _bfd_vms_output_check (bfd *, int)
void _bfd_vms_output_byte (bfd *, unsigned)
void _bfd_vms_output_short (bfd *, unsigned)
void _bfd_vms_output_long (bfd *, unsigned long)
void _bfd_vms_output_quad (bfd *, uquad)
void _bfd_vms_output_counted (bfd *, char *)
void _bfd_vms_output_dump (bfd *, unsigned char *, int)
void _bfd_vms_output_fill (bfd *, int, int)
char * _bfd_vms_length_hash_symbol (bfd *, const char *, int)
vms_symbol_entry_bfd_vms_enter_symbol (bfd *, char *)

Class Documentation

struct _vms_section

Definition at line 490 of file vms.h.

Collaboration diagram for _vms_section:
Class Members
unsigned char * contents
struct _vms_section * next
bfd_vma offset
bfd_size_type size
struct _vms_reloc

Definition at line 500 of file vms.h.

Collaboration diagram for _vms_reloc:
Class Members
struct _vms_reloc * next
arelent * reloc
asection * section
struct hdr_struc

Definition at line 509 of file vms.h.

Class Members
int hdr_b_strlvl
char * hdr_c_lnm
char * hdr_c_src
char * hdr_c_ttl
long hdr_l_arch1
long hdr_l_arch2
long hdr_l_recsiz
char * hdr_t_date
char * hdr_t_name
char * hdr_t_version
struct eom_struc

Definition at line 525 of file vms.h.

Class Members
unsigned char eom_b_comcod
unsigned char eom_b_tfrflg
bfd_boolean eom_has_transfer
long eom_l_psindx
long eom_l_tfradr
long eom_l_total_lps
struct vms_symbol_struct

Definition at line 537 of file vms.h.

Collaboration diagram for vms_symbol_struct:
Class Members
asymbol * symbol
struct stack_struct

Definition at line 545 of file vms.h.

Class Members
int psect
uquad value
struct location_struct

Definition at line 554 of file vms.h.

Class Members
int psect
unsigned long value
struct vms_private_data_struct

Definition at line 563 of file vms.h.

Collaboration diagram for vms_private_data_struct:
Class Members
int buf_size
bfd_boolean fixup_done
int flag_hash_long_names
int flag_show_after_trunc
int gsd_sym_count
enum file_format_enum struct hdr_struc
unsigned char * image_ptr
asection * image_section
bfd_boolean is_vax
int length_pos
struct location_struct * location_stack
int output_alignment
unsigned char * output_buf
int output_size
unsigned char pdsc
struct proc_value * procedure
int push_level
int pushed_size
int rec_length
int rec_size
int rec_type
unsigned int section_count
asection ** sections
struct stack_struct * stack
int stackptr
asymbol ** symbols
struct bfd_symbol ** symcache
int symnum
unsigned char * vms_buf
int vms_linkage_index
unsigned char * vms_rec
vms_section * vms_section_table
struct bfd_hash_table * vms_symbol_table

Define Documentation

#define ALPHA_R_BRADDR   2

Definition at line 431 of file vms.h.

#define ALPHA_R_CODEADDR   13

Definition at line 442 of file vms.h.

#define ALPHA_R_HINT   3

Definition at line 432 of file vms.h.

#define ALPHA_R_IGNORE   0

Definition at line 429 of file vms.h.

#define ALPHA_R_LINKAGE   11

Definition at line 440 of file vms.h.

#define ALPHA_R_OP_PRSHIFT   10

Definition at line 439 of file vms.h.

#define ALPHA_R_OP_PSUB   9

Definition at line 438 of file vms.h.

#define ALPHA_R_OP_PUSH   7

Definition at line 436 of file vms.h.

#define ALPHA_R_OP_STORE   8

Definition at line 437 of file vms.h.

#define ALPHA_R_REFLONG   12

Definition at line 441 of file vms.h.

#define ALPHA_R_REFQUAD   1

Definition at line 430 of file vms.h.

#define ALPHA_R_SREL16   4

Definition at line 433 of file vms.h.

#define ALPHA_R_SREL32   5

Definition at line 434 of file vms.h.

#define ALPHA_R_SREL64   6

Definition at line 435 of file vms.h.

Value:

Definition at line 358 of file vms.h.

#define DBG_C_LOCAL_SYM
Value:

Definition at line 360 of file vms.h.

#define DBG_S_C_ADVANCED_TYPE   0xa3

Definition at line 317 of file vms.h.

Definition at line 374 of file vms.h.

Definition at line 375 of file vms.h.

Definition at line 379 of file vms.h.

#define DBG_S_C_COMPLX4   0x0c /* 2xF_float complex float. */

Definition at line 312 of file vms.h.

#define DBG_S_C_COMPLX8   0x0d /* 2xD_float complex double. */

Definition at line 313 of file vms.h.

#define DBG_S_C_COMPLX8_G   0x1d /* 2xG_float complex double. */

Definition at line 315 of file vms.h.

#define DBG_S_C_CSTRING   0x2e /* Asciz ('\0' terminated) string. */

Definition at line 323 of file vms.h.

#define DBG_S_C_ENUM_END   0xa6

Definition at line 334 of file vms.h.

#define DBG_S_C_ENUM_ITEM   0xa4

Definition at line 332 of file vms.h.

#define DBG_S_C_ENUM_START   0xa5

Definition at line 333 of file vms.h.

#define DBG_S_C_FUNCTION_ADDR   0x17

Definition at line 316 of file vms.h.

Definition at line 377 of file vms.h.

#define DBG_S_C_REAL4   0x0a

Definition at line 310 of file vms.h.

#define DBG_S_C_REAL8   0x0b /* D_float double. */

Definition at line 311 of file vms.h.

#define DBG_S_C_REAL8_G   0x1b /* G_float double. */

Definition at line 314 of file vms.h.

#define DBG_S_C_SBITA   0x29 /* Signed, aligned bit field. */

Definition at line 321 of file vms.h.

#define DBG_S_C_SBITU   0x2a /* Signed, unaligned bit field. */

Definition at line 322 of file vms.h.

#define DBG_S_C_SCHAR   0x06

Definition at line 306 of file vms.h.

#define DBG_S_C_SLINT   0x08

Definition at line 308 of file vms.h.

#define DBG_S_C_SQUAD   0x09

Definition at line 309 of file vms.h.

#define DBG_S_C_SSINT   0x07

Definition at line 307 of file vms.h.

Definition at line 376 of file vms.h.

#define DBG_S_C_STRUCT_END   0xac

Definition at line 337 of file vms.h.

#define DBG_S_C_STRUCT_ITEM   DST_K_VFLAGS_BITOFFS /* 0xff */

Definition at line 335 of file vms.h.

#define DBG_S_C_STRUCT_START   0xab

Definition at line 336 of file vms.h.

#define DBG_S_C_UBITA   0x01 /* Unsigned, aligned bit field. */

Definition at line 319 of file vms.h.

#define DBG_S_C_UBITU   0x22 /* Unsigned, unaligned bit field. */

Definition at line 320 of file vms.h.

#define DBG_S_C_UCHAR   0x02

Definition at line 302 of file vms.h.

#define DBG_S_C_ULINT   0x04

Definition at line 304 of file vms.h.

#define DBG_S_C_UQUAD   0x05

Definition at line 305 of file vms.h.

#define DBG_S_C_USINT   0x03

Definition at line 303 of file vms.h.

#define DBG_S_C_VOID   DST_K_TS_PTR

Definition at line 378 of file vms.h.

#define DBG_S_C_WCHAR   0x38 /* Wchar_t. */

Definition at line 324 of file vms.h.

#define DSC_K_CLASS_A   0x04 /* Array. */

Definition at line 328 of file vms.h.

#define DSC_K_CLASS_D   0x02 /* Dynamic string (not via malloc!). */

Definition at line 327 of file vms.h.

#define DSC_K_CLASS_S   0x01 /* Static (fixed length). */

Definition at line 326 of file vms.h.

#define DSC_K_CLASS_UBS   0x0d /* Unaligned bit string. */

Definition at line 329 of file vms.h.

#define DST_K_REG_VAX_AP   0x0c /* R12. */

Definition at line 349 of file vms.h.

#define DST_K_REG_VAX_FP   0x0d /* R13. */

Definition at line 350 of file vms.h.

#define DST_K_REG_VAX_SP   0x0e /* R14. */

Definition at line 351 of file vms.h.

#define DST_K_TS_ARRAY   0x07 /* Array type spec. */

Definition at line 370 of file vms.h.

#define DST_K_TS_ATOM   0x01 /* Atomic type specification. */

Definition at line 365 of file vms.h.

#define DST_K_TS_DSC   0x02 /* Descriptor type spec. */

Definition at line 366 of file vms.h.

#define DST_K_TS_IND   0x03 /* Indirect type specification. */

Definition at line 367 of file vms.h.

#define DST_K_TS_NOV_LENG   0x0e /* Novel length type spec. */

Definition at line 371 of file vms.h.

#define DST_K_TS_PTR   0x05 /* Pointer type spec. */

Definition at line 369 of file vms.h.

#define DST_K_TS_TPTR   0x04 /* Typed pointer type spec. */

Definition at line 368 of file vms.h.

#define DST_K_TYPSPEC   0xaf /* Type specification. */

Definition at line 338 of file vms.h.

#define DST_K_VALKIND_ADDR   1

Definition at line 346 of file vms.h.

#define DST_K_VALKIND_DESC   2

Definition at line 347 of file vms.h.

#define DST_K_VALKIND_LITERAL   0

Definition at line 345 of file vms.h.

#define DST_K_VALKIND_REG   3

Definition at line 348 of file vms.h.

#define DST_K_VFLAGS_BITOFFS   0xff /* Value contains bit offset. */

Definition at line 344 of file vms.h.

#define DST_K_VFLAGS_DSC   0xfa /* Descriptor used. */

Definition at line 341 of file vms.h.

#define DST_K_VFLAGS_NOVAL   0x80 /* Struct definition only. */

Definition at line 340 of file vms.h.

#define DST_K_VFLAGS_TVS   0xfb /* Trailing value specified. */

Definition at line 342 of file vms.h.

#define DST_K_VS_ALLOC_SPLIT   3 /* Split lifetime. */

Definition at line 363 of file vms.h.

#define DST_K_VS_FOLLOWS   0xfd /* Value spec follows. */

Definition at line 343 of file vms.h.

#define DST_M_DISP   (1<<DST_V_DISP)

Definition at line 357 of file vms.h.

#define DST_M_INDIRECT   (1<<DST_V_INDIRECT)

Definition at line 356 of file vms.h.

#define DST_S_C_BEG_STMT_MODE   7

Definition at line 277 of file vms.h.

#define DST_S_C_BLKBEG   176 /* Beginning of block. */

Definition at line 260 of file vms.h.

#define DST_S_C_BLKEND   177 /* End of block. */

Definition at line 261 of file vms.h.

#define DST_S_C_C   7 /* Language == "C". */

Definition at line 255 of file vms.h.

#define DST_S_C_CXX   15 /* Language == "C++". */

Definition at line 256 of file vms.h.

#define DST_S_C_DELTA_PC_L   17 /* Incr PC. */

Definition at line 287 of file vms.h.

#define DST_S_C_DELTA_PC_W   1 /* Incr PC. */

Definition at line 271 of file vms.h.

#define DST_S_C_END_STMT_MODE   8

Definition at line 278 of file vms.h.

#define DST_S_C_ENTRY   181

Definition at line 262 of file vms.h.

#define DST_S_C_INCR_LINUM   2 /* Incr Line #. */

Definition at line 272 of file vms.h.

#define DST_S_C_INCR_LINUM_L   18 /* Incr Line #. */

Definition at line 288 of file vms.h.

#define DST_S_C_INCR_LINUM_W   3 /* Incr Line #. */

Definition at line 273 of file vms.h.

#define DST_S_C_LABEL   187

Definition at line 266 of file vms.h.

#define DST_S_C_LBLORLIT   186

Definition at line 265 of file vms.h.

#define DST_S_C_LINE_NUM   185 /* Line Number. */

Definition at line 264 of file vms.h.

#define DST_S_C_MODBEG   188 /* Beginning of module. */

Definition at line 267 of file vms.h.

#define DST_S_C_MODEND   189 /* End of module. */

Definition at line 268 of file vms.h.

#define DST_S_C_PROLOG   162

Definition at line 259 of file vms.h.

#define DST_S_C_PSECT   184

Definition at line 263 of file vms.h.

#define DST_S_C_RESET_LINUM_INCR   6

Definition at line 276 of file vms.h.

#define DST_S_C_RTNBEG   190 /* Beginning of routine.*/

Definition at line 269 of file vms.h.

#define DST_S_C_RTNEND   191 /* End of routine. */

Definition at line 270 of file vms.h.

#define DST_S_C_SET_ABS_PC   16 /* Set PC. */

Definition at line 286 of file vms.h.

#define DST_S_C_SET_LINE_NUM   9 /* Set Line #. */

Definition at line 279 of file vms.h.

#define DST_S_C_SET_LINUM_B   19 /* Set Line #. */

Definition at line 289 of file vms.h.

#define DST_S_C_SET_LINUM_INCR   4

Definition at line 274 of file vms.h.

#define DST_S_C_SET_LINUM_INCR_W   5

Definition at line 275 of file vms.h.

#define DST_S_C_SET_LINUM_L   20 /* Set Line #. */

Definition at line 290 of file vms.h.

#define DST_S_C_SET_PC   10

Definition at line 280 of file vms.h.

#define DST_S_C_SET_PC_L   12

Definition at line 282 of file vms.h.

#define DST_S_C_SET_PC_W   11

Definition at line 281 of file vms.h.

#define DST_S_C_SET_STMTNUM   13

Definition at line 283 of file vms.h.

#define DST_S_C_SOURCE   155 /* Source file. */

Definition at line 258 of file vms.h.

#define DST_S_C_SRC_DECLFILE   1 /* Declare source file. */

Definition at line 293 of file vms.h.

#define DST_S_C_SRC_DEFLINES_B   11 /* # of line, byte counter. */

Definition at line 298 of file vms.h.

#define DST_S_C_SRC_DEFLINES_W   10 /* # of line, word counter. */

Definition at line 297 of file vms.h.

#define DST_S_C_SRC_FORMFEED   16 /* ^L counts as a record. */

Definition at line 299 of file vms.h.

#define DST_S_C_SRC_SETFILE   2 /* Set source file. */

Definition at line 294 of file vms.h.

#define DST_S_C_SRC_SETREC_L   3 /* Set record, longword value. */

Definition at line 295 of file vms.h.

#define DST_S_C_SRC_SETREC_W   4 /* Set record, word value. */

Definition at line 296 of file vms.h.

#define DST_S_C_TERM   14 /* End of lines. */

Definition at line 284 of file vms.h.

#define DST_S_C_TERM_L   21 /* End of lines. */

Definition at line 291 of file vms.h.

#define DST_S_C_TERM_W   15 /* End of lines. */

Definition at line 285 of file vms.h.

#define DST_S_C_VERSION   153

Definition at line 257 of file vms.h.

#define DST_V_DISP   3 /* Offset to displacement bit. */

Definition at line 354 of file vms.h.

#define DST_V_INDIRECT   2 /* Offset to indirect bit. */

Definition at line 353 of file vms.h.

#define DST_V_REGNUM   4 /* Offset to register number. */

Definition at line 355 of file vms.h.

#define DST_V_VALKIND   0 /* Offset of valkind field. */

Definition at line 352 of file vms.h.

#define EGPS_S_V_COM   0x0800

Definition at line 232 of file vms.h.

#define EGPS_S_V_EXE   0x0040

Definition at line 227 of file vms.h.

#define EGPS_S_V_GBL   0x0010

Definition at line 225 of file vms.h.

#define EGPS_S_V_LIB   0x0002

Definition at line 222 of file vms.h.

#define EGPS_S_V_NOMOD   0x0400

Definition at line 231 of file vms.h.

#define EGPS_S_V_OVR   0x0004

Definition at line 223 of file vms.h.

#define EGPS_S_V_PIC   0x0001

Definition at line 221 of file vms.h.

#define EGPS_S_V_RD   0x0080

Definition at line 228 of file vms.h.

#define EGPS_S_V_REL   0x0008

Definition at line 224 of file vms.h.

#define EGPS_S_V_SHR   0x0020

Definition at line 226 of file vms.h.

#define EGPS_S_V_VEC   0x0200

Definition at line 230 of file vms.h.

#define EGPS_S_V_WRT   0x0100

Definition at line 229 of file vms.h.

#define EGSD_S_C_ENTRIES   2 /* Offset to first entry in record. */

Definition at line 198 of file vms.h.

#define EGSD_S_C_IDC   2 /* Random entity check. */

Definition at line 201 of file vms.h.

#define EGSD_S_C_MAXRECTYP   8 /* Maximum entry type defined. */

Definition at line 206 of file vms.h.

#define EGSD_S_C_PSC   0 /* Psect definition. */

Definition at line 199 of file vms.h.

#define EGSD_S_C_SPSC   5 /* Shareable image psect definition. */

Definition at line 202 of file vms.h.

#define EGSD_S_C_SYM   1 /* Symbol specification. */

Definition at line 200 of file vms.h.

#define EGSD_S_C_SYMG   8 /* EGST - gst version of SYM. */

Definition at line 205 of file vms.h.

#define EGSD_S_C_SYMM   7 /* Masked versions of SYM. */

Definition at line 204 of file vms.h.

#define EGSD_S_C_SYMV   6 /* Vectored (dual-valued) versions of SYM. */

Definition at line 203 of file vms.h.

#define EGSD_S_K_ENTRIES   2 /* Offset to first entry in record. */

Definition at line 197 of file vms.h.

#define EGSY_S_V_COMM   0x0010

Definition at line 243 of file vms.h.

#define EGSY_S_V_DEF   0x0002

Definition at line 240 of file vms.h.

#define EGSY_S_V_NORM   0x0040

Definition at line 245 of file vms.h.

#define EGSY_S_V_REL   0x0008

Definition at line 242 of file vms.h.

#define EGSY_S_V_UNI   0x0004

Definition at line 241 of file vms.h.

#define EGSY_S_V_VECEP   0x0020

Definition at line 244 of file vms.h.

#define EGSY_S_V_WEAK   0x0001

Definition at line 239 of file vms.h.

#define EMH_S_C_CPR   4 /* Copyright notice. */

Definition at line 396 of file vms.h.

#define EMH_S_C_GTX   6 /* General text. */

Definition at line 398 of file vms.h.

#define EMH_S_C_LNM   1 /* Language name and version. */

Definition at line 393 of file vms.h.

#define EMH_S_C_MAXHDRTYP   6 /* Maximum allowable type. */

Definition at line 399 of file vms.h.

#define EMH_S_C_MHD   0 /* Main header record. */

Definition at line 392 of file vms.h.

#define EMH_S_C_MTC   5 /* Maintenance status. */

Definition at line 397 of file vms.h.

#define EMH_S_C_SRC   2 /* Source file specification. */

Definition at line 394 of file vms.h.

#define EMH_S_C_TTL   3 /* Title text of module. */

Definition at line 395 of file vms.h.

#define ENV_S_M_DEF   1

Definition at line 250 of file vms.h.

#define ENV_S_M_NESTED   2

Definition at line 251 of file vms.h.

#define EOBJ_S_C_EDBG   12 /* EVAX Dbugger information record. */

Definition at line 459 of file vms.h.

#define EOBJ_S_C_EEOM   9 /* EVAX ed of module record. */

Definition at line 456 of file vms.h.

#define EOBJ_S_C_EGSD   10 /* EVAX gobal symbol definition record.*/

Definition at line 457 of file vms.h.

#define EOBJ_S_C_EMH   8 /* EVAX mdule header record. */

Definition at line 455 of file vms.h.

#define EOBJ_S_C_ETBT   13 /* EVAX Taceback information record. */

Definition at line 460 of file vms.h.

#define EOBJ_S_C_ETIR   11 /* EVAX txt information record. */

Definition at line 458 of file vms.h.

#define EOBJ_S_C_MAXRECSIZ   8192 /* Maximu legal record size. */

Definition at line 467 of file vms.h.

#define EOBJ_S_C_MAXRECTYP   13 /* EVAX Lst assigned record type. */

Definition at line 461 of file vms.h.

#define EOBJ_S_C_PSCALILIM   16 /* Maximu p-sect alignment. */

Definition at line 476 of file vms.h.

#define EOBJ_S_C_SECSIZ   31 /* Maximu section name length. */

Definition at line 472 of file vms.h.

#define EOBJ_S_C_STOREPLIM   -1 /* Maximu repeat count on store commands. */

Definition at line 474 of file vms.h.

#define EOBJ_S_C_STRLVL   2 /* Structre level. */

Definition at line 469 of file vms.h.

#define EOBJ_S_C_SUBTYP   4

Definition at line 465 of file vms.h.

#define EOBJ_S_C_SYMSIZ   64 /* Maximu symbol length. */

Definition at line 471 of file vms.h.

#define EOBJ_S_K_SUBTYP   4

Definition at line 464 of file vms.h.

#define ETIR_S_C_CTL_AUGRB   151 /* Augment relocation base. */

Definition at line 152 of file vms.h.

#define ETIR_S_C_CTL_DFLOC   152 /* Define debug location. */

Definition at line 153 of file vms.h.

#define ETIR_S_C_CTL_SETRB   150 /* Set relocation base. */

Definition at line 151 of file vms.h.

#define ETIR_S_C_CTL_STKDL   154 /* Stack debug location. */

Definition at line 155 of file vms.h.

#define ETIR_S_C_CTL_STLOC   153 /* Set debug location. */

Definition at line 154 of file vms.h.

#define ETIR_S_C_MAXCTLCOD   154 /* Maximum control code. */

Definition at line 156 of file vms.h.

#define ETIR_S_C_MAXOPRCOD   116 /* Maximum operate code. */

Definition at line 149 of file vms.h.

#define ETIR_S_C_MAXSTACOD   6 /* Maximum stack code. */

Definition at line 113 of file vms.h.

#define ETIR_S_C_MAXSTCCOD   214 /* Maximum store-conditional code. */

Definition at line 173 of file vms.h.

#define ETIR_S_C_MAXSTOCOD   65 /* Maximum store code. */

Definition at line 130 of file vms.h.

#define ETIR_S_C_MINCTLCOD   150 /* Minimum control code. */

Definition at line 150 of file vms.h.

#define ETIR_S_C_MINOPRCOD   100 /* Minimum operate code. */

Definition at line 131 of file vms.h.

#define ETIR_S_C_MINSTACOD   0 /* Minimum store code. */

Definition at line 105 of file vms.h.

#define ETIR_S_C_MINSTCCOD   200 /* Minimum store-conditional code. */

Definition at line 157 of file vms.h.

#define ETIR_S_C_MINSTOCOD   50 /* Minimum store code. */

Definition at line 114 of file vms.h.

#define ETIR_S_C_OPR_ADD   101 /* Add. */

Definition at line 133 of file vms.h.

#define ETIR_S_C_OPR_AND   105 /* Logical AND. */

Definition at line 137 of file vms.h.

#define ETIR_S_C_OPR_ASH   111 /* Arithmetic shift. */

Definition at line 143 of file vms.h.

#define ETIR_S_C_OPR_COM   109 /* Complement. */

Definition at line 141 of file vms.h.

#define ETIR_S_C_OPR_DFLIT   116 /* Define a literal. */

Definition at line 148 of file vms.h.

#define ETIR_S_C_OPR_DIV   104 /* Divide. */

Definition at line 136 of file vms.h.

#define ETIR_S_C_OPR_EOR   107 /* Logical exclusive OR. */

Definition at line 139 of file vms.h.

#define ETIR_S_C_OPR_INSV   110 /* Insert bit field. */

Definition at line 142 of file vms.h.

#define ETIR_S_C_OPR_IOR   106 /* Logical inclusive OR. */

Definition at line 138 of file vms.h.

#define ETIR_S_C_OPR_MUL   103 /* Multiply. */

Definition at line 135 of file vms.h.

#define ETIR_S_C_OPR_NEG   108 /* Negate. */

Definition at line 140 of file vms.h.

#define ETIR_S_C_OPR_NOP   100 /* No-op. */

Definition at line 132 of file vms.h.

#define ETIR_S_C_OPR_REDEF   115 /* Redefine this symbol after pass 2. */

Definition at line 147 of file vms.h.

#define ETIR_S_C_OPR_ROT   113 /* Rotate. */

Definition at line 145 of file vms.h.

#define ETIR_S_C_OPR_SEL   114 /* Select one of three longwords on top of stack. */

Definition at line 146 of file vms.h.

#define ETIR_S_C_OPR_SUB   102 /* Subtract. */

Definition at line 134 of file vms.h.

#define ETIR_S_C_OPR_USH   112 /* Unsigned shift. */

Definition at line 144 of file vms.h.

#define ETIR_S_C_STA_CKARG   6 /* Check Arguments. */

Definition at line 112 of file vms.h.

#define ETIR_S_C_STA_GBL   0 /* Stack global symbol value. */

Definition at line 106 of file vms.h.

#define ETIR_S_C_STA_LI   4 /* Stack literal. */

Definition at line 110 of file vms.h.

#define ETIR_S_C_STA_LW   1 /* Stack longword. */

Definition at line 107 of file vms.h.

#define ETIR_S_C_STA_MOD   5 /* Stack module. */

Definition at line 111 of file vms.h.

#define ETIR_S_C_STA_PQ   3 /* Stack psect base plus quadword offset. */

Definition at line 109 of file vms.h.

#define ETIR_S_C_STA_QW   2 /* Stack quadword. */

Definition at line 108 of file vms.h.

#define ETIR_S_C_STC_BOH_GBL   211 /* Store-conditional BSR or Hint at global address. */

Definition at line 169 of file vms.h.

#define ETIR_S_C_STC_BOH_PS   212 /* Store-conditional BSR or Hint at pect + offset. */

Definition at line 170 of file vms.h.

#define ETIR_S_C_STC_BSR_GBL   207 /* Store-conditional BSR at global address. */

Definition at line 165 of file vms.h.

#define ETIR_S_C_STC_BSR_PS   208 /* Store-conditional BSR at pect + offset. */

Definition at line 166 of file vms.h.

#define ETIR_S_C_STC_GBL   202 /* Store-conditional Address at global address. */

Definition at line 160 of file vms.h.

#define ETIR_S_C_STC_GCA   203 /* Store-conditional Code Address at global address. */

Definition at line 161 of file vms.h.

#define ETIR_S_C_STC_LDA_GBL   209 /* Store-conditional LDA at global address. */

Definition at line 167 of file vms.h.

#define ETIR_S_C_STC_LDA_PS   210 /* Store-conditional LDA at psect + offset. */

Definition at line 168 of file vms.h.

#define ETIR_S_C_STC_LP   200 /* Store-conditional Linkage Pair. */

Definition at line 158 of file vms.h.

#define ETIR_S_C_STC_LP_PSB   201 /* Store-conditional Linkage Pair with Procedure Signature. */

Definition at line 159 of file vms.h.

#define ETIR_S_C_STC_NBH_GBL   213 /* Store-conditional NOP,BSR or HINT at global address. */

Definition at line 171 of file vms.h.

#define ETIR_S_C_STC_NBH_PS   214 /* Store-conditional NOP,BSR or HINT at psect + offset. */

Definition at line 172 of file vms.h.

#define ETIR_S_C_STC_NOP_GBL   205 /* Store-conditional NOP at address of global. */

Definition at line 163 of file vms.h.

#define ETIR_S_C_STC_NOP_PS   206 /* Store-conditional NOP at pect + offset. */

Definition at line 164 of file vms.h.

#define ETIR_S_C_STC_PS   204 /* Store-conditional Address at psect + offset. */

Definition at line 162 of file vms.h.

#define ETIR_S_C_STO_AB   58 /* Store absolute branch. */

Definition at line 123 of file vms.h.

#define ETIR_S_C_STO_B   50 /* Store byte. */

Definition at line 115 of file vms.h.

#define ETIR_S_C_STO_CA   56 /* Store code address. */

Definition at line 121 of file vms.h.

#define ETIR_S_C_STO_GBL   55 /* Store global. */

Definition at line 120 of file vms.h.

#define ETIR_S_C_STO_GBL_LW   62 /* Store global Longword. */

Definition at line 126 of file vms.h.

#define ETIR_S_C_STO_HINT_GBL   64 /* Store 14 bit HINT at global address. */

Definition at line 128 of file vms.h.

#define ETIR_S_C_STO_HINT_PS   65 /* Store 14 bit HINT at psect + offset */

Definition at line 129 of file vms.h.

#define ETIR_S_C_STO_IMM   61 /* Store immediate. */

Definition at line 125 of file vms.h.

#define ETIR_S_C_STO_IMMR   54 /* Store immediate Repeated. */

Definition at line 119 of file vms.h.

#define ETIR_S_C_STO_LP_PSB   63 /* STO_LP_PSB not valid in level 2 use STC_LP_PSB. */

Definition at line 127 of file vms.h.

#define ETIR_S_C_STO_LW   52 /* Store longword. */

Definition at line 117 of file vms.h.

#define ETIR_S_C_STO_OFF   59 /* Store offset within psect. */

Definition at line 124 of file vms.h.

#define ETIR_S_C_STO_QW   53 /* Store quadword. */

Definition at line 118 of file vms.h.

#define ETIR_S_C_STO_RB   57 /* Store relative branch. */

Definition at line 122 of file vms.h.

#define ETIR_S_C_STO_W   51 /* Store word. */

Definition at line 116 of file vms.h.

#define EVAX_OFFSET   256 /* Type ofset for EVAX codes in switch. */

Definition at line 478 of file vms.h.

#define GPS_S_C_NAME   9

Definition at line 219 of file vms.h.

#define GPS_S_K_NAME   9

Definition at line 218 of file vms.h.

#define GPS_S_M_EXE   64

Definition at line 214 of file vms.h.

#define GPS_S_M_GBL   16

Definition at line 212 of file vms.h.

#define GPS_S_M_LIB   2

Definition at line 209 of file vms.h.

#define GPS_S_M_OVR   4

Definition at line 210 of file vms.h.

#define GPS_S_M_PIC   1

Definition at line 208 of file vms.h.

#define GPS_S_M_RD   128

Definition at line 215 of file vms.h.

#define GPS_S_M_REL   8

Definition at line 211 of file vms.h.

#define GPS_S_M_SHR   32

Definition at line 213 of file vms.h.

#define GPS_S_M_VEC   512

Definition at line 217 of file vms.h.

#define GPS_S_M_WRT   256

Definition at line 216 of file vms.h.

#define GSD_S_C_ENTRIES   1

Definition at line 178 of file vms.h.

#define GSD_S_C_ENV   8

Definition at line 187 of file vms.h.

#define GSD_S_C_EPM   2

Definition at line 181 of file vms.h.

#define GSD_S_C_EPMV   14

Definition at line 193 of file vms.h.

#define GSD_S_C_EPMW   5

Definition at line 184 of file vms.h.

#define GSD_S_C_IDC   7

Definition at line 186 of file vms.h.

#define GSD_S_C_LEPM   10

Definition at line 189 of file vms.h.

#define GSD_S_C_LPRO   11

Definition at line 190 of file vms.h.

#define GSD_S_C_LSY   9

Definition at line 188 of file vms.h.

#define GSD_S_C_MAXRECTYP   15

Definition at line 195 of file vms.h.

#define GSD_S_C_PRO   3

Definition at line 182 of file vms.h.

#define GSD_S_C_PROV   15

Definition at line 194 of file vms.h.

#define GSD_S_C_PROW   6

Definition at line 185 of file vms.h.

#define GSD_S_C_PSC   0

Definition at line 179 of file vms.h.

#define GSD_S_C_SPSC   12

Definition at line 191 of file vms.h.

#define GSD_S_C_SYM   1

Definition at line 180 of file vms.h.

#define GSD_S_C_SYMV   13

Definition at line 192 of file vms.h.

#define GSD_S_C_SYMW   4

Definition at line 183 of file vms.h.

#define GSD_S_K_ENTRIES   1

Definition at line 177 of file vms.h.

#define GSY_S_M_DEF   2

Definition at line 235 of file vms.h.

#define GSY_S_M_REL   8

Definition at line 237 of file vms.h.

#define GSY_S_M_UNI   4

Definition at line 236 of file vms.h.

#define GSY_S_M_WEAK   1

Definition at line 234 of file vms.h.

#define LOCATION_SAVE_SIZE   32

Definition at line 559 of file vms.h.

#define LSY_S_M_DEF   2

Definition at line 247 of file vms.h.

#define LSY_S_M_REL   8

Definition at line 248 of file vms.h.

#define MAX_OUTREC_SIZE   4096

Definition at line 487 of file vms.h.

#define MHD_S_C_CPR   4

Definition at line 387 of file vms.h.

#define MHD_S_C_GTX   6

Definition at line 389 of file vms.h.

#define MHD_S_C_LNM   1

Definition at line 384 of file vms.h.

#define MHD_S_C_MAXHDRTYP   6

Definition at line 390 of file vms.h.

#define MHD_S_C_MHD   0

Definition at line 383 of file vms.h.

#define MHD_S_C_MTC   5

Definition at line 388 of file vms.h.

#define MHD_S_C_SRC   2

Definition at line 385 of file vms.h.

#define MHD_S_C_TTL   3

Definition at line 386 of file vms.h.

#define MIN_OUTREC_LUFT   64

Definition at line 488 of file vms.h.

#define OBJ_S_C_DBG   4 /* VAX Deugger information record. */

Definition at line 450 of file vms.h.

#define OBJ_S_C_EOM   3 /* VAX en of module record. */

Definition at line 449 of file vms.h.

#define OBJ_S_C_EOMW   7 /* VAX en of module word-psect record. */

Definition at line 453 of file vms.h.

#define OBJ_S_C_GSD   1 /* VAX glbal symbol definition record. */

Definition at line 447 of file vms.h.

#define OBJ_S_C_HDR   0 /* VAX moule header record. */

Definition at line 446 of file vms.h.

#define OBJ_S_C_LNK   6 /* VAX liker options record. */

Definition at line 452 of file vms.h.

#define OBJ_S_C_MAXRECSIZ   2048 /* Maximu legal record size. */

Definition at line 466 of file vms.h.

#define OBJ_S_C_MAXRECTYP   7 /* VAX Lat assigned record type. */

Definition at line 454 of file vms.h.

#define OBJ_S_C_PSCALILIM   9 /* Maximu p-sect alignment. */

Definition at line 475 of file vms.h.

#define OBJ_S_C_STOREPLIM   -1 /* Maximu repeat count on store commands. */

Definition at line 473 of file vms.h.

#define OBJ_S_C_STRLVL   0 /* Structre level. */

Definition at line 468 of file vms.h.

#define OBJ_S_C_SUBTYP   1

Definition at line 463 of file vms.h.

#define OBJ_S_C_SYMSIZ   31 /* Maximu symbol length. */

Definition at line 470 of file vms.h.

#define OBJ_S_C_TBT   5 /* VAX Trceback information record. */

Definition at line 451 of file vms.h.

#define OBJ_S_C_TIR   2 /* VAX tet information record. */

Definition at line 448 of file vms.h.

#define OBJ_S_K_SUBTYP   1

Definition at line 462 of file vms.h.

#define PRIV (   name)    ((struct vms_private_data_struct *) abfd->tdata.any)->name

Definition at line 618 of file vms.h.

#define SECTION_NAME_TEMPLATE   "__SEC__%d"

Definition at line 620 of file vms.h.

#define STACKSIZE   8192

Definition at line 550 of file vms.h.

#define TIR_S_C_CTL_AUGRB   81

Definition at line 99 of file vms.h.

#define TIR_S_C_CTL_DFLOC   82

Definition at line 100 of file vms.h.

#define TIR_S_C_CTL_SETRB   80

Definition at line 98 of file vms.h.

#define TIR_S_C_CTL_STKDL   84

Definition at line 102 of file vms.h.

#define TIR_S_C_CTL_STLOC   83

Definition at line 101 of file vms.h.

#define TIR_S_C_MAXCTLCOD   84

Definition at line 103 of file vms.h.

#define TIR_S_C_MAXOPRCOD   66

Definition at line 96 of file vms.h.

#define TIR_S_C_MAXSTACOD   19

Definition at line 51 of file vms.h.

#define TIR_S_C_MAXSTOCOD   42

Definition at line 77 of file vms.h.

#define TIR_S_C_MINCTLCOD   80

Definition at line 97 of file vms.h.

#define TIR_S_C_MINOPRCOD   50

Definition at line 78 of file vms.h.

#define TIR_S_C_MINSTOCOD   20

Definition at line 52 of file vms.h.

#define TIR_S_C_OPR_ADD   51

Definition at line 80 of file vms.h.

#define TIR_S_C_OPR_AND   55

Definition at line 84 of file vms.h.

#define TIR_S_C_OPR_ASH   61

Definition at line 90 of file vms.h.

#define TIR_S_C_OPR_COM   59

Definition at line 88 of file vms.h.

#define TIR_S_C_OPR_DFLIT   66

Definition at line 95 of file vms.h.

#define TIR_S_C_OPR_DIV   54

Definition at line 83 of file vms.h.

#define TIR_S_C_OPR_EOR   57

Definition at line 86 of file vms.h.

#define TIR_S_C_OPR_INSV   60

Definition at line 89 of file vms.h.

#define TIR_S_C_OPR_IOR   56

Definition at line 85 of file vms.h.

#define TIR_S_C_OPR_MUL   53

Definition at line 82 of file vms.h.

#define TIR_S_C_OPR_NEG   58

Definition at line 87 of file vms.h.

#define TIR_S_C_OPR_NOP   50

Definition at line 79 of file vms.h.

#define TIR_S_C_OPR_REDEF   65

Definition at line 94 of file vms.h.

#define TIR_S_C_OPR_ROT   63

Definition at line 92 of file vms.h.

#define TIR_S_C_OPR_SEL   64

Definition at line 93 of file vms.h.

#define TIR_S_C_OPR_SUB   52

Definition at line 81 of file vms.h.

#define TIR_S_C_OPR_USH   62

Definition at line 91 of file vms.h.

#define TIR_S_C_STA_BFI   9

Definition at line 40 of file vms.h.

#define TIR_S_C_STA_CKARG   13

Definition at line 44 of file vms.h.

#define TIR_S_C_STA_EPM   12

Definition at line 43 of file vms.h.

#define TIR_S_C_STA_GBL   0

Definition at line 31 of file vms.h.

#define TIR_S_C_STA_LEPM   19

Definition at line 50 of file vms.h.

#define TIR_S_C_STA_LFI   11

Definition at line 42 of file vms.h.

#define TIR_S_C_STA_LIT   18

Definition at line 49 of file vms.h.

#define TIR_S_C_STA_LSY   17

Definition at line 48 of file vms.h.

#define TIR_S_C_STA_LW   3

Definition at line 34 of file vms.h.

#define TIR_S_C_STA_PB   4

Definition at line 35 of file vms.h.

#define TIR_S_C_STA_PL   6

Definition at line 37 of file vms.h.

#define TIR_S_C_STA_PW   5

Definition at line 36 of file vms.h.

#define TIR_S_C_STA_SB   1

Definition at line 32 of file vms.h.

#define TIR_S_C_STA_SW   2

Definition at line 33 of file vms.h.

#define TIR_S_C_STA_UB   7

Definition at line 38 of file vms.h.

#define TIR_S_C_STA_UW   8

Definition at line 39 of file vms.h.

#define TIR_S_C_STA_WFI   10

Definition at line 41 of file vms.h.

#define TIR_S_C_STA_WPB   14

Definition at line 45 of file vms.h.

#define TIR_S_C_STA_WPL   16

Definition at line 47 of file vms.h.

#define TIR_S_C_STA_WPW   15

Definition at line 46 of file vms.h.

#define TIR_S_C_STO_B   37

Definition at line 71 of file vms.h.

#define TIR_S_C_STO_BD   23

Definition at line 57 of file vms.h.

#define TIR_S_C_STO_L   22

Definition at line 55 of file vms.h.

#define TIR_S_C_STO_LD   25

Definition at line 59 of file vms.h.

#define TIR_S_C_STO_LI   26

Definition at line 60 of file vms.h.

#define TIR_S_C_STO_LW   22

Definition at line 56 of file vms.h.

#define TIR_S_C_STO_PICR   28

Definition at line 62 of file vms.h.

#define TIR_S_C_STO_PIDR   27

Definition at line 61 of file vms.h.

#define TIR_S_C_STO_PIRR   42

Definition at line 76 of file vms.h.

#define TIR_S_C_STO_RB   39

Definition at line 73 of file vms.h.

#define TIR_S_C_STO_RIVB   41

Definition at line 75 of file vms.h.

#define TIR_S_C_STO_RL   31

Definition at line 65 of file vms.h.

#define TIR_S_C_STO_RSB   29

Definition at line 63 of file vms.h.

#define TIR_S_C_STO_RSW   30

Definition at line 64 of file vms.h.

#define TIR_S_C_STO_RUB   35

Definition at line 69 of file vms.h.

#define TIR_S_C_STO_RUW   36

Definition at line 70 of file vms.h.

#define TIR_S_C_STO_RW   40

Definition at line 74 of file vms.h.

#define TIR_S_C_STO_SB   20

Definition at line 53 of file vms.h.

#define TIR_S_C_STO_SW   21

Definition at line 54 of file vms.h.

#define TIR_S_C_STO_USB   33

Definition at line 67 of file vms.h.

#define TIR_S_C_STO_USW   34

Definition at line 68 of file vms.h.

#define TIR_S_C_STO_VPS   32

Definition at line 66 of file vms.h.

#define TIR_S_C_STO_W   38

Definition at line 72 of file vms.h.

#define TIR_S_C_STO_WD   24

Definition at line 58 of file vms.h.

#define VMS_SECTION_COUNT   1024

Definition at line 561 of file vms.h.


Typedef Documentation

typedef unsigned long uquad

Definition at line 484 of file vms.h.


Enumeration Type Documentation

Enumerator:
FF_UNKNOWN 
FF_FOREIGN 
FF_NATIVE 
FF_VAX 

Definition at line 535 of file vms.h.


Function Documentation

Definition at line 564 of file vms-misc.c.

{
  if (index >=  VMS_SECTION_COUNT)
    {
      bfd_set_error (bfd_error_nonrepresentable_section);
      return NULL;
    }
  return PRIV (vms_section_table)[index];
}

Here is the call graph for this function:

Here is the caller graph for this function:

vms_symbol_entry* _bfd_vms_enter_symbol ( bfd ,
char *   
)

Definition at line 953 of file vms-misc.c.

{
  vms_symbol_entry *entry;

#if VMS_DEBUG
  _bfd_vms_debug (6,  "_bfd_vms_enter_symbol %s\n", name);
#endif

  entry = (vms_symbol_entry *)
         bfd_hash_lookup (PRIV (vms_symbol_table), name, FALSE, FALSE);
  if (entry == 0)
    {
#if VMS_DEBUG
      _bfd_vms_debug (8,  "creating hash entry for %s\n", name);
#endif
      entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),
                                              name, TRUE, FALSE);
      if (entry != 0)
       {
         asymbol *symbol;
         symbol = new_symbol (abfd, name);
         if (symbol != 0)
           {
             entry->symbol = symbol;
             PRIV (gsd_sym_count)++;
             abfd->symcount++;
           }
         else
           entry = 0;
       }
      else
       (*_bfd_error_handler) (_("failed to enter %s"), name);
    }
  else
    {
#if VMS_DEBUG
      _bfd_vms_debug (8,  "found hash entry for %s\n", name);
#endif
    }

#if VMS_DEBUG
  _bfd_vms_debug (7, "-> entry %p, entry->symbol %p\n", entry, entry->symbol);
#endif
  return entry;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_get_header_values ( bfd ,
unsigned char *  ,
int ,
int  
)

Definition at line 223 of file vms-misc.c.

{
  int test_len, test_start, remaining;
  unsigned char *vms_buf;

#if VMS_DEBUG
  vms_debug (8, "_bfd_vms_get_record\n");
#endif

  /* Minimum is 6 bytes on Alpha
     (2 bytes length, 2 bytes record id, 2 bytes length repeated)

     On the VAX there's no length information in the record
     so start with OBJ_S_C_MAXRECSIZ.   */

  if (PRIV (buf_size) == 0)
    {
      bfd_size_type amt;

      if (PRIV (is_vax))
       {
         amt = OBJ_S_C_MAXRECSIZ;
         PRIV (file_format) = FF_VAX;
       }
      else
       amt = 6;
      PRIV (vms_buf) = bfd_malloc (amt);
      PRIV (buf_size) = amt;
    }

  vms_buf = PRIV (vms_buf);

  if (vms_buf == 0)
    return -1;

  switch (PRIV (file_format))
    {
    case FF_UNKNOWN:
    case FF_FOREIGN:
      test_len = 6;                /* Probe 6 bytes.  */
      test_start = 2;                     /* Where the record starts.  */
      break;

    case FF_NATIVE:
      test_len = 4;
      test_start = 0;
      break;

    default:
    case FF_VAX:
      test_len = 0;
      test_start = 0;
      break;
    }

  /* Skip odd alignment byte.  */

  if (bfd_tell (abfd) & 1)
    {
      if (bfd_bread (PRIV (vms_buf), (bfd_size_type) 1, abfd) != 1)
       {
         bfd_set_error (bfd_error_file_truncated);
         return 0;
       }
    }

  /* Read the record header on Alpha.  */
  if ((test_len != 0)
      && (bfd_bread (PRIV (vms_buf), (bfd_size_type) test_len, abfd)
         != (bfd_size_type) test_len))
    {
      bfd_set_error (bfd_error_file_truncated);
      return 0;
    }

  /* Check file format on first call.  */
  if (PRIV (file_format) == FF_UNKNOWN)
    {                                     /* Record length repeats ?  */
      if (vms_buf[0] == vms_buf[4]
         && vms_buf[1] == vms_buf[5])
       {
         PRIV (file_format) = FF_FOREIGN; /* Y: foreign environment.  */
         test_start = 2;
       }
      else
       {
         PRIV (file_format) = FF_NATIVE;  /* N: native environment.  */
         test_start = 0;
       }
    }

  if (PRIV (is_vax))
    {
      PRIV (rec_length) = bfd_bread (vms_buf, (bfd_size_type) PRIV (buf_size),
                                 abfd);
      if (PRIV (rec_length) <= 0)
       {
         bfd_set_error (bfd_error_file_truncated);
         return 0;
       }
      PRIV (vms_rec) = vms_buf;
    }
  else
    {
      /* Alpha.   */
      /* Extract vms record length.  */

      _bfd_vms_get_header_values (abfd, vms_buf + test_start, NULL,
                              & PRIV (rec_length));

      if (PRIV (rec_length) <= 0)
       {
         bfd_set_error (bfd_error_file_truncated);
         return 0;
       }

      /* That's what the linker manual says.  */

      if (PRIV (rec_length) > EOBJ_S_C_MAXRECSIZ)
       {
         bfd_set_error (bfd_error_file_truncated);
         return 0;
       }

      /* Adjust the buffer.  */

      if (PRIV (rec_length) > PRIV (buf_size))
       {
         PRIV (vms_buf) = bfd_realloc (vms_buf,
                                   (bfd_size_type) PRIV (rec_length));
         vms_buf = PRIV (vms_buf);
         if (vms_buf == 0)
           return -1;
         PRIV (buf_size) = PRIV (rec_length);
       }

      /* Read the remaining record.  */
      remaining = PRIV (rec_length) - test_len + test_start;

#if VMS_DEBUG
      vms_debug (10, "bfd_bread remaining %d\n", remaining);
#endif
      if (bfd_bread (vms_buf + test_len, (bfd_size_type) remaining, abfd) !=
         (bfd_size_type) remaining)
       {
         bfd_set_error (bfd_error_file_truncated);
         return 0;
       }
      PRIV (vms_rec) = vms_buf + test_start;
    }

#if VMS_DEBUG
  vms_debug (11, "bfd_bread rec_length %d\n", PRIV (rec_length));
#endif

  return PRIV (rec_length);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 134 of file vms-misc.c.

{
  vms_symbol_entry *ret;

#if VMS_DEBUG
  vms_debug (5, "_bfd_vms_hash_newfunc (%p, %p, %s)\n", entry, table, string);
#endif

  if (entry == NULL)
    {
      ret = (vms_symbol_entry *)
             bfd_hash_allocate (table, sizeof (vms_symbol_entry));
      if (ret ==  NULL)
       {
         bfd_set_error (bfd_error_no_memory);
         return NULL;
       }
      entry = (struct bfd_hash_entry *) ret;
    }

  /* Call the allocation method of the base class.  */
  ret = (vms_symbol_entry *) bfd_hash_newfunc (entry, table, string);
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_hash_newfunc ret %p\n", ret);
#endif

  ret->symbol = NULL;

  return (struct bfd_hash_entry *)ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* _bfd_vms_length_hash_symbol ( bfd ,
const char *  ,
int   
)

Definition at line 870 of file vms-misc.c.

{
  long int result;
  int in_len;
  char *new_name;
  const char *old_name;
  int i;
  static char outbuf[EOBJ_S_C_SYMSIZ+1];
  char *out = outbuf;

#if VMS_DEBUG
  vms_debug (4, "_bfd_vms_length_hash_symbol \"%s\"\n", in);
#endif

  if (maxlen > EOBJ_S_C_SYMSIZ)
    maxlen = EOBJ_S_C_SYMSIZ;

  /* Save this for later.  */
  new_name = out;

  /* We may need to truncate the symbol, save the hash for later.  */
  in_len = strlen (in);

  result = (in_len > maxlen) ? hash_string (in) : 0;

  old_name = in;

  /* Do the length checking.  */
  if (in_len <= maxlen)
    i = in_len;
  else
    {
      if (PRIV (flag_hash_long_names))
       i = maxlen-9;
      else
       i = maxlen;
    }

  strncpy (out, in, (size_t) i);
  in += i;
  out += i;

  if ((in_len > maxlen)
      && PRIV (flag_hash_long_names))
    sprintf (out, "_%08lx", result);
  else
    *out = 0;

#if VMS_DEBUG
  vms_debug (4, "--> [%d]\"%s\"\n", strlen (outbuf), outbuf);
#endif

  if (in_len > maxlen
       && PRIV (flag_hash_long_names)
       && PRIV (flag_show_after_trunc))
    printf (_("Symbol %s replaced by %s\n"), old_name, new_name);

  return outbuf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 385 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (8, "_bfd_vms_next_record (len %d, size %d)\n",
             PRIV (rec_length), PRIV (rec_size));
#endif

  if (PRIV (rec_length) > 0)
    PRIV (vms_rec) += PRIV (rec_size);
  else
    {
      if (_bfd_vms_get_record (abfd) <= 0)
       return -1;
    }

  if (!PRIV (vms_rec) || !PRIV (vms_buf)
      || PRIV (vms_rec) >= (PRIV (vms_buf) + PRIV (buf_size)))
    return -1;

  if (PRIV (is_vax))
    {
      PRIV (rec_type) = *(PRIV (vms_rec));
      PRIV (rec_size) = PRIV (rec_length);
    }
  else
    _bfd_vms_get_header_values (abfd, PRIV (vms_rec), &PRIV (rec_type),
                            &PRIV (rec_size));

  PRIV (rec_length) -= PRIV (rec_size);

#if VMS_DEBUG
  vms_debug (8, "_bfd_vms_next_record: rec %p, size %d, length %d, type %d\n",
             PRIV (vms_rec), PRIV (rec_size), PRIV (rec_length),
             PRIV (rec_type));
#endif

  return PRIV (rec_type);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_alignment ( bfd ,
int   
)

Definition at line 611 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_alignment (%d)\n", alignto);
#endif

  PRIV (output_alignment) = alignto;
}

Here is the caller graph for this function:

void _bfd_vms_output_begin ( bfd ,
int  ,
int   
)

Definition at line 582 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_begin (type %d, head %d)\n", rectype,
             rechead);
#endif

  _bfd_vms_output_short (abfd, (unsigned int) rectype);

  /* Save current output position to fill in length later.   */

  if (PRIV (push_level) > 0)
    PRIV (length_pos) = PRIV (output_size);

#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_begin: length_pos = %d\n",
             PRIV (length_pos));
#endif

  /* Placeholder for length.  */
  _bfd_vms_output_short (abfd, 0);

  if (rechead != -1)
    _bfd_vms_output_short (abfd, (unsigned int) rechead);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_byte ( bfd ,
unsigned   
)
int _bfd_vms_output_check ( bfd ,
int   
)

Definition at line 726 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_check (%d)\n", size);
#endif

  return (MAX_OUTREC_SIZE - (PRIV (output_size) + size + MIN_OUTREC_LUFT));
}

Here is the caller graph for this function:

void _bfd_vms_output_counted ( bfd ,
char *   
)

Definition at line 791 of file vms-misc.c.

{
  int len;

#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_counted (%s)\n", value);
#endif

  len = strlen (value);
  if (len == 0)
    {
      (*_bfd_error_handler) (_("_bfd_vms_output_counted called with zero bytes"));
      return;
    }
  if (len > 255)
    {
      (*_bfd_error_handler) (_("_bfd_vms_output_counted called with too many bytes"));
      return;
    }
  _bfd_vms_output_byte (abfd, (unsigned int) len & 0xff);
  _bfd_vms_output_dump (abfd, (unsigned char *) value, len);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_dump ( bfd ,
unsigned char *  ,
int   
)

Definition at line 817 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_dump (%d)\n", length);
#endif

  if (length == 0)
    return;

  memcpy (PRIV (output_buf) + PRIV (output_size), data, (size_t) length);
  PRIV (output_size) += length;
}

Here is the caller graph for this function:

void _bfd_vms_output_end ( bfd )

Definition at line 712 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_end\n");
#endif

  _bfd_vms_output_flush (abfd);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_fill ( bfd ,
int  ,
int   
)

Definition at line 835 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_fill (val %02x times %d)\n", value, count);
#endif

  if (count == 0)
    return;
  memset (PRIV (output_buf) + PRIV (output_size), value, (size_t) count);
  PRIV (output_size) += count;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_flush ( bfd )

Definition at line 656 of file vms-misc.c.

{
  int real_size = PRIV (output_size);
  int aligncount;
  int length;

#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_flush (real_size = %d, pushed_size %d at lenpos %d)\n",
             real_size, PRIV (pushed_size), PRIV (length_pos));
#endif

  if (PRIV (push_level) > 0)
    length = real_size - PRIV (pushed_size);
  else
    length = real_size;

  if (length == 0)
    return;
  aligncount = (PRIV (output_alignment)
              - (length % PRIV (output_alignment))) % PRIV (output_alignment);

#if VMS_DEBUG
  vms_debug (6, "align: adding %d bytes\n", aligncount);
#endif

  while (aligncount-- > 0)
    {
      PRIV (output_buf)[real_size++] = 0;
      length++;
    }

  /* Put length to buffer.  */
  PRIV (output_size) = PRIV (length_pos);
  _bfd_vms_output_short (abfd, (unsigned int) length);

  if (PRIV (push_level) == 0)
    {
#ifndef VMS
       /* Write length first, see FF_FOREIGN in the input routines.  */
      fwrite (PRIV (output_buf) + 2, 2, 1, (FILE *) abfd->iostream);
#endif
      fwrite (PRIV (output_buf), (size_t) real_size, 1,
             (FILE *) abfd->iostream);

      PRIV (output_size) = 0;
    }
  else
    {
      PRIV (output_size) = real_size;
      PRIV (pushed_size) = PRIV (output_size);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_long ( bfd ,
unsigned  long 
)

Definition at line 765 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_long (%08lx)\n", value);
#endif

  bfd_put_32 (abfd, (bfd_vma) value, PRIV (output_buf) + PRIV (output_size));
  PRIV (output_size) += 4;
}

Here is the caller graph for this function:

void _bfd_vms_output_pop ( bfd )

Definition at line 636 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "vms_output_pop (pushed_size = %d)\n", PRIV (pushed_size));
#endif

  _bfd_vms_output_flush (abfd);
  PRIV (length_pos) = 2;

#if VMS_DEBUG
  vms_debug (6, "vms_output_pop: length_pos = %d\n", PRIV (length_pos));
#endif

  PRIV (pushed_size) = 0;
  PRIV (push_level)--;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_output_push ( bfd )

Definition at line 623 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "vms_output_push (pushed_size = %d)\n", PRIV (output_size));
#endif

  PRIV (push_level)++;
  PRIV (pushed_size) = PRIV (output_size);
}

Here is the caller graph for this function:

void _bfd_vms_output_quad ( bfd ,
uquad   
)

Definition at line 778 of file vms-misc.c.

{
#if VMS_DEBUG
  vms_debug (6, "_bfd_vms_output_quad (%016lx)\n", value);
#endif

  bfd_put_64(abfd, value, PRIV (output_buf) + PRIV (output_size));
  PRIV (output_size) += 8;
}

Here is the caller graph for this function:

void _bfd_vms_output_short ( bfd ,
unsigned   
)
uquad _bfd_vms_pop ( bfd ,
int  
)

Definition at line 481 of file vms-misc.c.

{
  uquad value;

  if (PRIV (stackptr) == 0)
    {
      bfd_set_error (bfd_error_bad_value);
      (*_bfd_error_handler) (_("Stack underflow in _bfd_vms_pop"));
      exit (1);
    }
  PRIV (stackptr)--;
  value = PRIV (stack[PRIV (stackptr)]).value;
  if ((psect != NULL) && (PRIV (stack[PRIV (stackptr)]).psect >= 0))
    *psect = PRIV (stack[PRIV (stackptr)]).psect;

#if VMS_DEBUG
  vms_debug (4, "<pop %016lx(%d)>\n", value, PRIV (stack[PRIV (stackptr)]).psect);
#endif

  return value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void _bfd_vms_push ( bfd ,
uquad  ,
int   
)

Definition at line 456 of file vms-misc.c.

{
  static int last_psect;

#if VMS_DEBUG
  vms_debug (4, "<push %016lx (%d) at %d>\n", val, psect, PRIV (stackptr));
#endif

  if (psect >= 0)
    last_psect = psect;

  PRIV (stack[PRIV (stackptr)]).value = val;
  PRIV (stack[PRIV (stackptr)]).psect = last_psect;
  PRIV (stackptr)++;
  if (PRIV (stackptr) >= STACKSIZE)
    {
      bfd_set_error (bfd_error_bad_value);
      (*_bfd_error_handler) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr));
      exit (1);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 444 of file vms-misc.c.

{
  int len = *ptr++;

  return _bfd_vms_save_sized_string (ptr, len);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* _bfd_vms_save_sized_string ( unsigned char *  ,
int   
)

Definition at line 428 of file vms-misc.c.

{
  char *newstr = bfd_malloc ((bfd_size_type) size + 1);

  if (newstr == NULL)
    return NULL;
  strncpy (newstr, (char *) str, (size_t) size);
  newstr[size] = 0;

  return newstr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_slurp_dbg ( bfd ,
int   
)
int _bfd_vms_slurp_eom ( bfd ,
int   
)

Definition at line 306 of file vms-hdr.c.

{
  unsigned char *vms_rec;

#if VMS_DEBUG
  vms_debug(2, "EOM/EEOM\n");
#endif

  vms_rec = PRIV (vms_rec);

  if ((objtype == OBJ_S_C_EOM)
     || (objtype == OBJ_S_C_EOMW))
    {
    }
  else
    {
      PRIV (eom_data).eom_l_total_lps = bfd_getl32 (vms_rec + 4);
      PRIV (eom_data).eom_b_comcod = *(vms_rec + 8);

      if (PRIV (eom_data).eom_b_comcod > 1)
       {
         (*_bfd_error_handler) (_("Object module NOT error-free !\n"));
         bfd_set_error (bfd_error_bad_value);
         return -1;
       }
      PRIV (eom_data).eom_has_transfer = FALSE;
      if (PRIV (rec_size) > 10)
       {
          PRIV (eom_data).eom_has_transfer = TRUE;
          PRIV (eom_data).eom_b_tfrflg = *(vms_rec + 9);
          PRIV (eom_data).eom_l_psindx = bfd_getl32 (vms_rec + 12);
          PRIV (eom_data).eom_l_tfradr = bfd_getl32 (vms_rec + 16);

          abfd->start_address = PRIV (eom_data).eom_l_tfradr;
       }
    }
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_slurp_gsd ( bfd ,
int   
)

Definition at line 230 of file vms-gsd.c.

{
#if VMS_DEBUG
  static struct flagdescstruct gpsflagdesc[] =
    {
      { "PIC", 0x0001 },
      { "LIB", 0x0002 },
      { "OVR", 0x0004 },
      { "REL", 0x0008 },
      { "GBL", 0x0010 },
      { "SHR", 0x0020 },
      { "EXE", 0x0040 },
      { "RD",  0x0080 },
      { "WRT", 0x0100 },
      { "VEC", 0x0200 },
      { "NOMOD", 0x0400 },
      { "COM", 0x0800 },
      { NULL, 0 }
    };

  static struct flagdescstruct gsyflagdesc[] =
    {
      { "WEAK", 0x0001 },
      { "DEF",  0x0002 },
      { "UNI",  0x0004 },
      { "REL",  0x0008 },
      { "COMM", 0x0010 },
      { "VECEP", 0x0020 },
      { "NORM", 0x0040 },
      { NULL, 0 }
    };
#endif

  int gsd_type, gsd_size;
  asection *section;
  unsigned char *vms_rec;
  flagword new_flags, old_flags;
  char *name;
  asymbol *symbol;
  vms_symbol_entry *entry;
  unsigned long base_addr;
  unsigned long align_addr;
  static unsigned int psect_idx = 0;

#if VMS_DEBUG
  vms_debug (2, "GSD/EGSD (%d/%x)\n", objtype, objtype);
#endif

  switch (objtype)
    {
    case EOBJ_S_C_EGSD:
      PRIV (vms_rec) += 8;  /* Skip type, size, l_temp.  */
      PRIV (rec_size) -= 8;
      break;
    case OBJ_S_C_GSD:
      PRIV (vms_rec) += 1;
      PRIV (rec_size) -= 1;
      break;
    default:
      return -1;
    }

  /* Calculate base address for each section.  */
  base_addr = 0L;

  abfd->symcount = 0;

  while (PRIV (rec_size) > 0)
    {
      vms_rec = PRIV (vms_rec);

      if (objtype == OBJ_S_C_GSD)
       gsd_type = *vms_rec;
      else
       {
         _bfd_vms_get_header_values (abfd, vms_rec, &gsd_type, &gsd_size);
         gsd_type += EVAX_OFFSET;
       }

#if VMS_DEBUG
      vms_debug (3, "gsd_type %d\n", gsd_type);
#endif

      switch (gsd_type)
       {
       case GSD_S_C_PSC:
         {
           /* Program section definition.  */
           asection *old_section = 0;

#if VMS_DEBUG
           vms_debug (4, "GSD_S_C_PSC\n");
#endif
           /* If this section isn't a bfd section.  */
           if (PRIV (is_vax) && (psect_idx < (abfd->section_count-1)))
             {
              /* Check for temporary section from TIR record.  */
              if (psect_idx < PRIV (section_count))
                old_section = PRIV (sections)[psect_idx];
              else
                old_section = 0;
             }

           name = _bfd_vms_save_counted_string (vms_rec + 8);
           section = bfd_make_section (abfd, name);
           if (!section)
             {
              (*_bfd_error_handler) (_("bfd_make_section (%s) failed"),
                                   name);
              return -1;
             }
           old_flags = bfd_getl16 (vms_rec + 2);
           section->size = bfd_getl32 (vms_rec + 4);  /* allocation */
           new_flags = vms_secflag_by_name (abfd, vax_section_flags, name,
                                        section->size > 0);
           if (old_flags & EGPS_S_V_REL)
             new_flags |= SEC_RELOC;
           if (old_flags & GPS_S_M_OVR)
             new_flags |= SEC_IS_COMMON;
           if (!bfd_set_section_flags (abfd, section, new_flags))
             {
              (*_bfd_error_handler)
                (_("bfd_set_section_flags (%s, %x) failed"),
                 name, new_flags);
              return -1;
             }
           section->alignment_power = vms_rec[1];
           align_addr = (1 << section->alignment_power);
           if ((base_addr % align_addr) != 0)
             base_addr += (align_addr - (base_addr % align_addr));
           section->vma = (bfd_vma)base_addr;
           base_addr += section->size;

           /* Global section is common symbol.  */

           if (old_flags & GPS_S_M_GBL)
             {
              entry = _bfd_vms_enter_symbol (abfd, name);
              if (entry == NULL)
                {
                  bfd_set_error (bfd_error_no_memory);
                  return -1;
                }
              symbol = entry->symbol;

              symbol->value = 0;
              symbol->section = section;
              symbol->flags = (BSF_GLOBAL | BSF_SECTION_SYM | BSF_OLD_COMMON);
             }

           /* Copy saved contents if old_section set.  */
           if (old_section != 0)
             {
              section->contents = old_section->contents;
              if (section->size < old_section->size)
                {
                  (*_bfd_error_handler)
                    (_("Size mismatch section %s=%lx, %s=%lx"),
                     old_section->name,
                     (unsigned long) old_section->size,
                     section->name,
                     (unsigned long) section->size);
                  return -1;
                }
              else if (section->size > old_section->size)
                {
                  section->contents = bfd_realloc (old_section->contents,
                                               section->size);
                  if (section->contents == NULL)
                    {
                     bfd_set_error (bfd_error_no_memory);
                     return -1;
                    }
                }
             }
           else
             {
              section->contents = bfd_zmalloc (section->size);
              if (section->contents == NULL)
                {
                  bfd_set_error (bfd_error_no_memory);
                  return -1;
                }
             }
#if VMS_DEBUG
           vms_debug (4, "gsd psc %d (%s, flags %04x=%s) ",
                     section->index, name, old_flags, flag2str (gpsflagdesc, old_flags));
           vms_debug (4, "%d bytes at 0x%08lx (mem %p)\n",
                     section->size, section->vma, section->contents);
#endif

           gsd_size = vms_rec[8] + 9;

           psect_idx++;
         }
         break;

       case GSD_S_C_EPM:
       case GSD_S_C_EPMW:
#if VMS_DEBUG
         vms_debug (4, "gsd epm\n");
#endif
         /* Fall through.  */
       case GSD_S_C_SYM:
       case GSD_S_C_SYMW:
         {
           int name_offset = 0, value_offset = 0;

           /* Symbol specification (definition or reference).  */
#if VMS_DEBUG
           vms_debug (4, "GSD_S_C_SYM(W)\n");
#endif
           old_flags = bfd_getl16 (vms_rec + 2);
           new_flags = BSF_NO_FLAGS;

           if (old_flags & GSY_S_M_WEAK)
             new_flags |= BSF_WEAK;

           switch (gsd_type)
             {
             case GSD_S_C_EPM:
              name_offset = 11;
              value_offset = 5;
              new_flags |= BSF_FUNCTION;
              break;
             case GSD_S_C_EPMW:
              name_offset = 12;
              value_offset = 6;
              new_flags |= BSF_FUNCTION;
              break;
             case GSD_S_C_SYM:
              if (old_flags & GSY_S_M_DEF)       /* Symbol definition.  */
                name_offset = 9;
              else
                name_offset = 4;
              value_offset = 5;
              break;
             case GSD_S_C_SYMW:
              if (old_flags & GSY_S_M_DEF)       /* Symbol definition.  */
                name_offset = 10;
              else
                name_offset = 5;
              value_offset = 6;
              break;
             }

           /* Save symbol in vms_symbol_table.  */
           entry = _bfd_vms_enter_symbol
             (abfd, _bfd_vms_save_counted_string (vms_rec + name_offset));
           if (entry == NULL)
             {
              bfd_set_error (bfd_error_no_memory);
              return -1;
             }
           symbol = entry->symbol;

           if (old_flags & GSY_S_M_DEF)
             {
              /* Symbol definition.  */
              int psect;

              symbol->value = bfd_getl32 (vms_rec + value_offset);
              if ((gsd_type == GSD_S_C_SYMW)
                  || (gsd_type == GSD_S_C_EPMW))
                psect = bfd_getl16 (vms_rec + value_offset - 2);
              else
                psect = vms_rec[value_offset-1];

              symbol->section = (asection *) (size_t) psect;
#if VMS_DEBUG
              vms_debug (4, "gsd sym def #%d (%s, %d [%p], %04x=%s)\n", abfd->symcount,
                        symbol->name, (int)symbol->section, symbol->section, old_flags, flag2str (gsyflagdesc, old_flags));
#endif
             }
           else
             {
              /* Symbol reference.  */
              symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
#if VMS_DEBUG
              vms_debug (4, "gsd sym ref #%d (%s, %s [%p], %04x=%s)\n",
                        abfd->symcount, symbol->name, symbol->section->name,
                        symbol->section, old_flags, flag2str (gsyflagdesc, old_flags));
#endif
             }

           gsd_size = vms_rec[name_offset] + name_offset + 1;
           symbol->flags = new_flags;
         }

         break;

       case GSD_S_C_PRO:
       case GSD_S_C_PROW:
#if VMS_DEBUG
         vms_debug (4, "gsd pro\n");
#endif
         break;
       case GSD_S_C_IDC:
#if VMS_DEBUG
         vms_debug (4, "gsd idc\n");
#endif
         break;
       case GSD_S_C_ENV:
#if VMS_DEBUG
         vms_debug (4, "gsd env\n");
#endif
         break;
       case GSD_S_C_LSY:
#if VMS_DEBUG
         vms_debug (4, "gsd lsy\n");
#endif
         break;
       case GSD_S_C_LEPM:
#if VMS_DEBUG
         vms_debug (4, "gsd lepm\n");
#endif
         break;
       case GSD_S_C_LPRO:
#if VMS_DEBUG
         vms_debug (4, "gsd lpro\n");
#endif
         break;
       case GSD_S_C_SPSC:
#if VMS_DEBUG
         vms_debug (4, "gsd spsc\n");
#endif
         break;
       case GSD_S_C_SYMV:
#if VMS_DEBUG
         vms_debug (4, "gsd symv\n");
#endif
         break;
       case GSD_S_C_EPMV:
#if VMS_DEBUG
         vms_debug (4, "gsd epmv\n");
#endif
         break;
       case GSD_S_C_PROV:
#if VMS_DEBUG
         vms_debug (4, "gsd prov\n");
#endif
         break;

       case EGSD_S_C_PSC + EVAX_OFFSET:
         {
           /* Program section definition.  */
           name = _bfd_vms_save_counted_string (vms_rec + 12);
           section = bfd_make_section (abfd, name);
           if (!section)
             return -1;
           old_flags = bfd_getl16 (vms_rec + 6);
           section->size = bfd_getl32 (vms_rec + 8);    /* Allocation.  */
           new_flags = vms_secflag_by_name (abfd, evax_section_flags, name,
                                        section->size > 0);
           if (old_flags & EGPS_S_V_REL)
             new_flags |= SEC_RELOC;
           if (!bfd_set_section_flags (abfd, section, new_flags))
             return -1;
           section->alignment_power = vms_rec[4];
           align_addr = (1 << section->alignment_power);
           if ((base_addr % align_addr) != 0)
             base_addr += (align_addr - (base_addr % align_addr));
           section->vma = (bfd_vma)base_addr;
           base_addr += section->size;
           section->contents = bfd_zmalloc (section->size);
           if (section->contents == NULL)
             return -1;
#if VMS_DEBUG
           vms_debug (4, "egsd psc %d (%s, flags %04x=%s) ",
                     section->index, name, old_flags, flag2str (gpsflagdesc, old_flags));
           vms_debug (4, "%d bytes at 0x%08lx (mem %p)\n",
                     section->size, section->vma, section->contents);
#endif
         }
         break;

       case EGSD_S_C_SYM + EVAX_OFFSET:
         {
           /* Symbol specification (definition or reference).  */
           symbol = bfd_make_empty_symbol (abfd);
           if (symbol == 0)
             return -1;

           old_flags = bfd_getl16 (vms_rec + 6);
           new_flags = BSF_NO_FLAGS;

           if (old_flags & EGSY_S_V_WEAK)
             new_flags |= BSF_WEAK;

           if (vms_rec[6] & EGSY_S_V_DEF)
             {
              /* Symbol definition.  */
              symbol->name = _bfd_vms_save_counted_string (vms_rec + 32);
              if (old_flags & EGSY_S_V_NORM)
                /* Proc def.  */
                new_flags |= BSF_FUNCTION;

              symbol->value = bfd_getl64 (vms_rec + 8);
              symbol->section = (asection *) ((unsigned long) bfd_getl32 (vms_rec + 28));
#if VMS_DEBUG
              vms_debug (4, "egsd sym def #%d (%s, %d, %04x=%s)\n", abfd->symcount,
                        symbol->name, (int) symbol->section, old_flags,
                        flag2str (gsyflagdesc, old_flags));
#endif
             }
           else
             {
              /* Symbol reference.  */
              symbol->name = _bfd_vms_save_counted_string (vms_rec + 8);
#if VMS_DEBUG
              vms_debug (4, "egsd sym ref #%d (%s, %04x=%s)\n", abfd->symcount,
                       symbol->name, old_flags, flag2str (gsyflagdesc, old_flags));
#endif
              symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
             }

           symbol->flags = new_flags;

           /* Save symbol in vms_symbol_table.  */
           entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table),
                                                   symbol->name,
                                                   TRUE, FALSE);
           if (entry == NULL)
             {
              bfd_set_error (bfd_error_no_memory);
              return -1;
             }

           if (entry->symbol != NULL)
             {
              /* FIXME ?, DEC C generates this.  */
#if VMS_DEBUG
              vms_debug (4, "EGSD_S_C_SYM: duplicate \"%s\"\n", symbol->name);
#endif
             }
           else
             {
              entry->symbol = symbol;
              PRIV (gsd_sym_count)++;
              abfd->symcount++;
             }
         }
         break;

       case EGSD_S_C_IDC + EVAX_OFFSET:
         break;

       default:
         (*_bfd_error_handler) (_("unknown gsd/egsd subtype %d"), gsd_type);
         bfd_set_error (bfd_error_bad_value);
         return -1;
       }

      PRIV (rec_size) -= gsd_size;
      PRIV (vms_rec) += gsd_size;
    }

  if (abfd->symcount > 0)
    abfd->flags |= HAS_SYMS;

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_slurp_hdr ( bfd ,
int   
)

Definition at line 45 of file vms-hdr.c.

{
  unsigned char *ptr;
  unsigned char *vms_rec;
  int subtype;

  vms_rec = PRIV(vms_rec);

#if VMS_DEBUG
  vms_debug(2, "HDR/EMH\n");
#endif

  switch (objtype)
    {
    case OBJ_S_C_HDR:
      subtype = vms_rec[1];
      break;
    case EOBJ_S_C_EMH:
      subtype = bfd_getl16 (vms_rec + 4) + EVAX_OFFSET;
      break;
    default:
      subtype = -1;
    }

#if VMS_DEBUG
  vms_debug(3, "subtype %d\n", subtype);
#endif

  switch (subtype)
    {
    case MHD_S_C_MHD:
      /* Module header.  */
      PRIV (hdr_data).hdr_b_strlvl = vms_rec[2];
      PRIV (hdr_data).hdr_l_recsiz = bfd_getl16 (vms_rec + 3);
      PRIV (hdr_data).hdr_t_name = _bfd_vms_save_counted_string (vms_rec + 5);
      ptr = vms_rec + 5 + vms_rec[5] + 1;
      PRIV (hdr_data).hdr_t_version = _bfd_vms_save_counted_string (ptr);
      ptr += *ptr + 1;
      PRIV (hdr_data).hdr_t_date = _bfd_vms_save_sized_string (ptr, 17);
      break;

    case MHD_S_C_LNM:
      PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2));
      break;

    case MHD_S_C_SRC:
      PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2));
      break;

    case MHD_S_C_TTL:
      PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2));
      break;

    case EMH_S_C_MHD + EVAX_OFFSET:
      /* Module header.  */
      PRIV (hdr_data).hdr_b_strlvl = vms_rec[6];
      PRIV (hdr_data).hdr_l_arch1  = bfd_getl32 (vms_rec + 8);
      PRIV (hdr_data).hdr_l_arch2  = bfd_getl32 (vms_rec + 12);
      PRIV (hdr_data).hdr_l_recsiz = bfd_getl32 (vms_rec + 16);
      PRIV (hdr_data).hdr_t_name   = _bfd_vms_save_counted_string (vms_rec + 20);
      ptr = vms_rec + 20 + vms_rec[20] + 1;
      PRIV (hdr_data).hdr_t_version =_bfd_vms_save_counted_string (ptr);
      ptr += *ptr + 1;
      PRIV (hdr_data).hdr_t_date = _bfd_vms_save_sized_string (ptr, 17);
      break;

    case EMH_S_C_LNM + EVAX_OFFSET:
      PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6));
      break;

    case EMH_S_C_SRC + EVAX_OFFSET:
      PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6));
      break;

    case EMH_S_C_TTL + EVAX_OFFSET:
      PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6));
      break;

    case MHD_S_C_CPR:
    case MHD_S_C_MTC:
    case MHD_S_C_GTX:
    case EMH_S_C_CPR + EVAX_OFFSET:
    case EMH_S_C_MTC + EVAX_OFFSET:
    case EMH_S_C_GTX + EVAX_OFFSET:
      break;

    default:
      bfd_set_error (bfd_error_wrong_format);
      return -1;
    }

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_slurp_lnk ( bfd ,
int   
)
int _bfd_vms_slurp_tbt ( bfd ,
int   
)
int _bfd_vms_slurp_tir ( bfd ,
int   
)

Definition at line 1675 of file vms-tir.c.

{
  int result;

#if VMS_DEBUG
  _bfd_vms_debug (2, "TIR/ETIR\n");
#endif

  switch (objtype)
    {
    case EOBJ_S_C_ETIR:
      PRIV (vms_rec) += 4;  /* Skip type, size.  */
      PRIV (rec_size) -= 4;
      result = analyze_etir (abfd, PRIV (vms_rec), (unsigned) PRIV (rec_size));
      break;
    case OBJ_S_C_TIR:
      PRIV (vms_rec) += 1;  /* Skip type.  */
      PRIV (rec_size) -= 1;
      result = analyze_tir (abfd, PRIV (vms_rec), (unsigned) PRIV (rec_size));
      break;
    default:
      result = -1;
      break;
    }

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_write_dbg ( bfd ,
int   
)
int _bfd_vms_write_eom ( bfd ,
int   
)

Definition at line 348 of file vms-hdr.c.

{
#if VMS_DEBUG
  vms_debug (2, "vms_write_eom (%p, %d)\n", abfd, objtype);
#endif

  _bfd_vms_output_begin (abfd, objtype, -1);
  _bfd_vms_output_long (abfd, (unsigned long) (PRIV (vms_linkage_index) >> 1));
  _bfd_vms_output_byte (abfd, 0);  /* Completion code.  */
  _bfd_vms_output_byte (abfd, 0);  /* Fill byte.  */

  if (bfd_get_start_address (abfd) != (bfd_vma)-1)
    {
      asection *section;

      section = bfd_get_section_by_name (abfd, ".link");
      if (section == 0)
       {
         bfd_set_error (bfd_error_nonrepresentable_section);
         return -1;
       }
      _bfd_vms_output_short (abfd, 0);
      _bfd_vms_output_long (abfd, (unsigned long) (section->index));
      _bfd_vms_output_long (abfd,
                          (unsigned long) bfd_get_start_address (abfd));
      _bfd_vms_output_long (abfd, 0);
    }

  _bfd_vms_output_end (abfd);
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_write_gsd ( bfd ,
int   
)
int _bfd_vms_write_hdr ( bfd ,
int   
)

Definition at line 185 of file vms-hdr.c.

{
  asymbol *symbol;
  unsigned int symnum;
  int had_case = 0;
  int had_file = 0;

#if VMS_DEBUG
  vms_debug (2, "vms_write_hdr (%p)\n", abfd);
#endif

  _bfd_vms_output_alignment (abfd, 2);

  /* MHD.  */
  if (objtype != OBJ_S_C_HDR)
    {
      _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_MHD);
      _bfd_vms_output_short (abfd, EOBJ_S_C_STRLVL);
      _bfd_vms_output_long (abfd, 0);
      _bfd_vms_output_long (abfd, 0);
      _bfd_vms_output_long (abfd, MAX_OUTREC_SIZE);
    }

  if (bfd_get_filename (abfd) != 0)
    {
      /* Strip path and suffix information.  */
      char *fname, *fout, *fptr;

      fptr = bfd_get_filename (abfd);
      fname = alloca (strlen (fptr) + 1);
      strcpy (fname, fptr);
      fout = strrchr (fname, ']');
      if (fout == 0)
       fout = strchr (fname, ':');
      if (fout != 0)
       fout++;
      else
       fout = fname;

      /* Strip .obj suffix.  */
      fptr = strrchr (fname, '.');
      if ((fptr != 0)
         && (strcasecmp (fptr, ".OBJ") == 0))
       *fptr = 0;

      fptr = fout;
      while (*fptr != 0)
       {
         *fptr = TOUPPER (*fptr);
         fptr++;
         if ((*fptr == ';')
            || ((fptr - fout) > 31))
           *fptr = 0;
       }
      _bfd_vms_output_counted (abfd, fout);
    }
  else
    _bfd_vms_output_counted (abfd, "NONAME");

  _bfd_vms_output_counted (abfd, BFD_VERSION_STRING);
  _bfd_vms_output_dump (abfd, get_vms_time_string (), 17);
  _bfd_vms_output_fill (abfd, 0, 17);
  _bfd_vms_output_flush (abfd);

  /* LMN.  */
  _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_LNM);
  _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("GAS proGIS"));
  _bfd_vms_output_flush (abfd);

  /* SRC.  */
  _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_SRC);

  for (symnum = 0; symnum < abfd->symcount; symnum++)
    {
      symbol = abfd->outsymbols[symnum];

      if (symbol->flags & BSF_FILE)
       {
         if (CONST_STRNEQ ((char *)symbol->name, "<CASE:"))
           {
             PRIV (flag_hash_long_names) = symbol->name[6] - '0';
             PRIV (flag_show_after_trunc) = symbol->name[7] - '0';

             if (had_file)
              break;
             had_case = 1;
             continue;
           }

         _bfd_vms_output_dump (abfd, (unsigned char *) symbol->name,
                            (int) strlen (symbol->name));
         if (had_case)
           break;
         had_file = 1;
       }
    }

  if (symnum == abfd->symcount)
    _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("noname"));

  _bfd_vms_output_flush (abfd);

  /* TTL.  */
  _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_TTL);
  _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("TTL"));
  _bfd_vms_output_flush (abfd);

  /* CPR.  */
  _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_CPR);
  _bfd_vms_output_dump (abfd,
                      (unsigned char *)"GNU BFD ported by Klaus Kämpf 1994-1996",
                      39);
  _bfd_vms_output_flush (abfd);

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int _bfd_vms_write_tbt ( bfd ,
int   
)
int _bfd_vms_write_tir ( bfd ,
int   
)