| 1 | /* VMS object file format | 
|---|
| 2 | Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, | 
|---|
| 3 | 2002, 2003 Free Software Foundation, Inc. | 
|---|
| 4 |  | 
|---|
| 5 | This file is part of GAS, the GNU Assembler. | 
|---|
| 6 |  | 
|---|
| 7 | GAS is free software; you can redistribute it and/or modify | 
|---|
| 8 | it under the terms of the GNU General Public License as | 
|---|
| 9 | published by the Free Software Foundation; either version 2, | 
|---|
| 10 | or (at your option) any later version. | 
|---|
| 11 |  | 
|---|
| 12 | GAS is distributed in the hope that it will be useful, but | 
|---|
| 13 | WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See | 
|---|
| 15 | the GNU General Public License for more details. | 
|---|
| 16 |  | 
|---|
| 17 | You should have received a copy of the GNU General Public License | 
|---|
| 18 | along with GAS; see the file COPYING.  If not, write to the Free | 
|---|
| 19 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA | 
|---|
| 20 | 02111-1307, USA.  */ | 
|---|
| 21 |  | 
|---|
| 22 | /* Tag to validate a.out object file format processing */ | 
|---|
| 23 | #define OBJ_VMS 1 | 
|---|
| 24 |  | 
|---|
| 25 | #include "targ-cpu.h" | 
|---|
| 26 |  | 
|---|
| 27 | #define LONGWORD_ALIGNMENT      2 | 
|---|
| 28 |  | 
|---|
| 29 | /* This macro controls subsection alignment within a section. | 
|---|
| 30 | * | 
|---|
| 31 | * Under VAX/VMS, the linker (and PSECT specifications) | 
|---|
| 32 | * take care of correctly aligning the segments. | 
|---|
| 33 | * Doing the alignment here (on initialized data) can | 
|---|
| 34 | * mess up the calculation of global data PSECT sizes. | 
|---|
| 35 | */ | 
|---|
| 36 | #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \ | 
|---|
| 37 | (((SEG) == data_section) ? 0 : LONGWORD_ALIGNMENT) | 
|---|
| 38 |  | 
|---|
| 39 | /* This flag is used to remember whether we are in the const or the | 
|---|
| 40 | data section.  By and large they are identical, but we set a no-write | 
|---|
| 41 | bit for psects in the const section.  */ | 
|---|
| 42 |  | 
|---|
| 43 | extern unsigned char const_flag; | 
|---|
| 44 |  | 
|---|
| 45 | /* This is overloaded onto const_flag, for convenience.  It's used to flag | 
|---|
| 46 | dummy labels like "gcc2_compiled."  which occur before the first .text | 
|---|
| 47 | or .data section directive.  */ | 
|---|
| 48 |  | 
|---|
| 49 | #define IN_DEFAULT_SECTION 0x80 | 
|---|
| 50 |  | 
|---|
| 51 | /* These are defined in obj-vms.c.  */ | 
|---|
| 52 | extern const short seg_N_TYPE[]; | 
|---|
| 53 | extern const segT N_TYPE_seg[]; | 
|---|
| 54 |  | 
|---|
| 55 | #undef NO_RELOC | 
|---|
| 56 | enum reloc_type | 
|---|
| 57 | { | 
|---|
| 58 | NO_RELOC, RELOC_32 | 
|---|
| 59 | }; | 
|---|
| 60 |  | 
|---|
| 61 | #define N_BADMAG(x)     (0) | 
|---|
| 62 | #define N_TXTOFF(x)     ( sizeof (struct exec) ) | 
|---|
| 63 | #define N_DATOFF(x)     ( N_TXTOFF(x) + (x).a_text ) | 
|---|
| 64 | #define N_TROFF(x)      ( N_DATOFF(x) + (x).a_data ) | 
|---|
| 65 | #define N_DROFF(x)      ( N_TROFF(x) + (x).a_trsize ) | 
|---|
| 66 | #define N_SYMOFF(x)     ( N_DROFF(x) + (x).a_drsize ) | 
|---|
| 67 | #define N_STROFF(x)     ( N_SYMOFF(x) + (x).a_syms ) | 
|---|
| 68 |  | 
|---|
| 69 | /* We use this copy of the exec header for VMS.  We do not actually use it, but | 
|---|
| 70 | what we actually do is let gas fill in the relevant slots, and when we get | 
|---|
| 71 | around to writing an obj file, we just pick out what we need.  */ | 
|---|
| 72 |  | 
|---|
| 73 | struct exec | 
|---|
| 74 | { | 
|---|
| 75 | unsigned long a_text;         /* length of text, in bytes */ | 
|---|
| 76 | unsigned long a_data;         /* length of data, in bytes */ | 
|---|
| 77 | unsigned long a_bss;          /* length of uninitialized data area for file, in bytes */ | 
|---|
| 78 | unsigned long a_trsize;       /* length of relocation info for text, in bytes */ | 
|---|
| 79 | unsigned long a_drsize;       /* length of relocation info for data, in bytes */ | 
|---|
| 80 | unsigned long a_entry;        /* start address */ | 
|---|
| 81 | unsigned long a_syms;         /* length of symbol table data in file, in bytes */ | 
|---|
| 82 | }; | 
|---|
| 83 |  | 
|---|
| 84 | typedef struct | 
|---|
| 85 | { | 
|---|
| 86 | struct exec header;         /* a.out header */ | 
|---|
| 87 | long string_table_size;     /* names + '\0' + sizeof (int) */ | 
|---|
| 88 | } | 
|---|
| 89 | object_headers; | 
|---|
| 90 |  | 
|---|
| 91 | /* A single entry in the symbol table | 
|---|
| 92 | * (this started as a clone of bout.h's nlist, but much was unneeded). | 
|---|
| 93 | */ | 
|---|
| 94 | struct nlist | 
|---|
| 95 | { | 
|---|
| 96 | char *n_name; | 
|---|
| 97 | unsigned char n_type;       /* See below                            */ | 
|---|
| 98 | unsigned char n_other;      /* used for const_flag and "default section" */ | 
|---|
| 99 | unsigned    : 16;           /* padding for alignment */ | 
|---|
| 100 | int n_desc;                 /* source line number for N_SLINE stabs */ | 
|---|
| 101 | }; | 
|---|
| 102 |  | 
|---|
| 103 | /* Legal values of n_type (see aout/stab.def for the majority of the codes). | 
|---|
| 104 | */ | 
|---|
| 105 | #define N_UNDF  0               /* Undefined symbol     */ | 
|---|
| 106 | #define N_ABS   2               /* Absolute symbol      */ | 
|---|
| 107 | #define N_TEXT  4               /* Text symbol          */ | 
|---|
| 108 | #define N_DATA  6               /* Data symbol          */ | 
|---|
| 109 | #define N_BSS   8               /* BSS symbol           */ | 
|---|
| 110 | #define N_FN    31              /* Filename symbol      */ | 
|---|
| 111 |  | 
|---|
| 112 | #define N_EXT   1               /* External symbol (OR'd in with one of above)  */ | 
|---|
| 113 | #define N_TYPE  036             /* Mask for all the type bits                   */ | 
|---|
| 114 |  | 
|---|
| 115 | #define N_STAB  0340            /* Mask for all bits used for SDB entries       */ | 
|---|
| 116 |  | 
|---|
| 117 | #include "aout/stab_gnu.h" | 
|---|
| 118 |  | 
|---|
| 119 | /* SYMBOL TABLE */ | 
|---|
| 120 | /* Symbol table entry data type */ | 
|---|
| 121 |  | 
|---|
| 122 | typedef struct nlist obj_symbol_type;   /* Symbol table entry */ | 
|---|
| 123 |  | 
|---|
| 124 | /* Symbol table macros and constants */ | 
|---|
| 125 |  | 
|---|
| 126 | #define OBJ_SYMFIELD_TYPE struct VMS_Symbol * | 
|---|
| 127 |  | 
|---|
| 128 | /* | 
|---|
| 129 | *  Macros to extract information from a symbol table entry. | 
|---|
| 130 | *  This syntaxic indirection allows independence regarding a.out or coff. | 
|---|
| 131 | *  The argument (s) of all these macros is a pointer to a symbol table entry. | 
|---|
| 132 | */ | 
|---|
| 133 |  | 
|---|
| 134 | /* True if the symbol is external */ | 
|---|
| 135 | #define S_IS_EXTERNAL(s)        ((s)->sy_symbol.n_type & N_EXT) | 
|---|
| 136 |  | 
|---|
| 137 | /* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */ | 
|---|
| 138 | #define S_IS_DEFINED(s)         (S_GET_TYPE(s) != N_UNDF) | 
|---|
| 139 |  | 
|---|
| 140 | #define S_IS_COMMON(s)  (S_GET_TYPE(s) == N_UNDF && S_GET_VALUE(s) != 0) | 
|---|
| 141 |  | 
|---|
| 142 | /* Return true for symbols that should not be reduced to section | 
|---|
| 143 | symbols or eliminated from expressions, because they may be | 
|---|
| 144 | overridden by the linker.  */ | 
|---|
| 145 | #define S_FORCE_RELOC(s, strict) \ | 
|---|
| 146 | (!SEG_NORMAL (S_GET_SEGMENT (s))) | 
|---|
| 147 |  | 
|---|
| 148 | #define S_IS_REGISTER(s)        ((s)->sy_symbol.n_type == N_REGISTER) | 
|---|
| 149 |  | 
|---|
| 150 | /* True if a debug special symbol entry */ | 
|---|
| 151 | #define S_IS_DEBUG(s)           ((s)->sy_symbol.n_type & N_STAB) | 
|---|
| 152 | /* True if a symbol is local symbol name */ | 
|---|
| 153 | /* A symbol name whose name begin with ^A is a gas internal pseudo symbol | 
|---|
| 154 | nameless symbols come from .stab directives.  */ | 
|---|
| 155 | #define S_IS_LOCAL(s)           (S_GET_NAME(s) && \ | 
|---|
| 156 | !S_IS_DEBUG(s) && \ | 
|---|
| 157 | (strchr(S_GET_NAME(s), '\001') != 0 || \ | 
|---|
| 158 | strchr(S_GET_NAME(s), '\002') != 0 || \ | 
|---|
| 159 | (S_LOCAL_NAME(s) && !flag_keep_locals))) | 
|---|
| 160 | /* True if a symbol is not defined in this file */ | 
|---|
| 161 | #define S_IS_EXTERN(s)          ((s)->sy_symbol.n_type & N_EXT) | 
|---|
| 162 | /* True if the symbol has been generated because of a .stabd directive */ | 
|---|
| 163 | #define S_IS_STABD(s)           (S_GET_NAME(s) == (char *)0) | 
|---|
| 164 |  | 
|---|
| 165 | /* Accessors */ | 
|---|
| 166 | /* The name of the symbol */ | 
|---|
| 167 | #define S_GET_NAME(s)           ((s)->sy_symbol.n_name) | 
|---|
| 168 | /* The pointer to the string table */ | 
|---|
| 169 | #define S_GET_OFFSET(s)         ((s)->sy_name_offset) | 
|---|
| 170 | /* The raw type of the symbol */ | 
|---|
| 171 | #define S_GET_RAW_TYPE(s)               ((s)->sy_symbol.n_type) | 
|---|
| 172 | /* The type of the symbol */ | 
|---|
| 173 | #define S_GET_TYPE(s)           ((s)->sy_symbol.n_type & N_TYPE) | 
|---|
| 174 | /* The numeric value of the segment */ | 
|---|
| 175 | #define S_GET_SEGMENT(s)        (N_TYPE_seg[S_GET_TYPE(s)]) | 
|---|
| 176 | /* The n_other expression value */ | 
|---|
| 177 | #define S_GET_OTHER(s)          ((s)->sy_symbol.n_other) | 
|---|
| 178 | /* The n_desc expression value */ | 
|---|
| 179 | #define S_GET_DESC(s)           ((s)->sy_symbol.n_desc) | 
|---|
| 180 |  | 
|---|
| 181 | /* Modifiers */ | 
|---|
| 182 | /* Assume that a symbol cannot be simultaneously in more than on segment */ | 
|---|
| 183 | /* set segment */ | 
|---|
| 184 | #define S_SET_SEGMENT(s,seg)    ((s)->sy_symbol.n_type &= ~N_TYPE,(s)->sy_symbol.n_type|=SEGMENT_TO_SYMBOL_TYPE(seg)) | 
|---|
| 185 | /* The symbol is external */ | 
|---|
| 186 | #define S_SET_EXTERNAL(s)       ((s)->sy_symbol.n_type |= N_EXT) | 
|---|
| 187 | /* The symbol is not external */ | 
|---|
| 188 | #define S_CLEAR_EXTERNAL(s)     ((s)->sy_symbol.n_type &= ~N_EXT) | 
|---|
| 189 | /* Set the name of the symbol */ | 
|---|
| 190 | #define S_SET_NAME(s,v)         ((s)->sy_symbol.n_name = (v)) | 
|---|
| 191 | /* Set the offset in the string table */ | 
|---|
| 192 | #define S_SET_OFFSET(s,v)       ((s)->sy_name_offset = (v)) | 
|---|
| 193 | /* Set the n_other expression value */ | 
|---|
| 194 | #define S_SET_OTHER(s,v)        ((s)->sy_symbol.n_other = (v)) | 
|---|
| 195 | /* Set the n_desc expression value */ | 
|---|
| 196 | #define S_SET_DESC(s,v)         ((s)->sy_symbol.n_desc = (v)) | 
|---|
| 197 | /* Set the n_type expression value */ | 
|---|
| 198 | #define S_SET_TYPE(s,v)         ((s)->sy_symbol.n_type = (v)) | 
|---|
| 199 |  | 
|---|
| 200 | /* File header macro and type definition */ | 
|---|
| 201 |  | 
|---|
| 202 | #define H_GET_TEXT_SIZE(h)              ((h)->header.a_text) | 
|---|
| 203 | #define H_GET_DATA_SIZE(h)              ((h)->header.a_data) | 
|---|
| 204 | #define H_GET_BSS_SIZE(h)               ((h)->header.a_bss) | 
|---|
| 205 |  | 
|---|
| 206 | #define H_SET_TEXT_SIZE(h,v)            ((h)->header.a_text = md_section_align(SEG_TEXT, (v))) | 
|---|
| 207 | #define H_SET_DATA_SIZE(h,v)            ((h)->header.a_data = md_section_align(SEG_DATA, (v))) | 
|---|
| 208 | #define H_SET_BSS_SIZE(h,v)             ((h)->header.a_bss = md_section_align(SEG_BSS, (v))) | 
|---|
| 209 |  | 
|---|
| 210 | #define H_SET_STRING_SIZE(h,v)          ((h)->string_table_size = (v)) | 
|---|
| 211 | #define H_SET_SYMBOL_TABLE_SIZE(h,v)    ((h)->header.a_syms = (v) * \ | 
|---|
| 212 | sizeof (struct nlist)) | 
|---|
| 213 |  | 
|---|
| 214 | /* line numbering stuff.  */ | 
|---|
| 215 | #define OBJ_EMIT_LINENO(a, b, c)        {;} | 
|---|
| 216 |  | 
|---|
| 217 | #define obj_symbol_new_hook(s)  {;} | 
|---|
| 218 |  | 
|---|
| 219 | /* Force structure tags into scope so that their use in prototypes | 
|---|
| 220 | will never be their first occurance.  */ | 
|---|
| 221 | struct fix; | 
|---|
| 222 | struct frag; | 
|---|
| 223 |  | 
|---|
| 224 | /* obj-vms routines visible to the rest of gas.  */ | 
|---|
| 225 |  | 
|---|
| 226 | extern void tc_aout_fix_to_chars PARAMS ((char *,struct fix *,relax_addressT)); | 
|---|
| 227 |  | 
|---|
| 228 | extern int vms_resolve_symbol_redef PARAMS ((symbolS *)); | 
|---|
| 229 | #define RESOLVE_SYMBOL_REDEFINITION(X)  vms_resolve_symbol_redef(X) | 
|---|
| 230 |  | 
|---|
| 231 | /* Compiler-generated label "__vax_g_doubles" is used to augment .stabs.  */ | 
|---|
| 232 | extern void vms_check_for_special_label PARAMS ((symbolS *)); | 
|---|
| 233 | #define obj_frob_label(X) vms_check_for_special_label(X) | 
|---|
| 234 |  | 
|---|
| 235 | extern void vms_check_for_main PARAMS ((void)); | 
|---|
| 236 |  | 
|---|
| 237 | extern void vms_write_object_file PARAMS ((unsigned,unsigned,unsigned, | 
|---|
| 238 | struct frag *,struct frag *)); | 
|---|
| 239 |  | 
|---|
| 240 | /* VMS executables are nothing like a.out, but the VMS port of gcc uses | 
|---|
| 241 | a.out format stabs which obj-vms.c then translates.  */ | 
|---|
| 242 |  | 
|---|
| 243 | #define AOUT_STABS | 
|---|
| 244 |  | 
|---|
| 245 |  | 
|---|
| 246 |  | 
|---|
| 247 | #ifdef WANT_VMS_OBJ_DEFS | 
|---|
| 248 |  | 
|---|
| 249 | /* The rest of this file contains definitions for constants used within | 
|---|
| 250 | the actual VMS object file.  We do not use a $ in the symbols (as per | 
|---|
| 251 | usual VMS convention) since System V gags on it.  */ | 
|---|
| 252 |  | 
|---|
| 253 | #define OBJ_S_C_HDR     0 | 
|---|
| 254 | #define OBJ_S_C_HDR_MHD 0 | 
|---|
| 255 | #define OBJ_S_C_HDR_LNM 1 | 
|---|
| 256 | #define OBJ_S_C_HDR_SRC 2 | 
|---|
| 257 | #define OBJ_S_C_HDR_TTL 3 | 
|---|
| 258 | #define OBJ_S_C_HDR_CPR 4 | 
|---|
| 259 | #define OBJ_S_C_HDR_MTC 5 | 
|---|
| 260 | #define OBJ_S_C_HDR_GTX 6 | 
|---|
| 261 | #define OBJ_S_C_GSD     1 | 
|---|
| 262 | #define OBJ_S_C_GSD_PSC 0 | 
|---|
| 263 | #define OBJ_S_C_GSD_SYM 1 | 
|---|
| 264 | #define OBJ_S_C_GSD_EPM 2 | 
|---|
| 265 | #define OBJ_S_C_GSD_PRO 3 | 
|---|
| 266 | #define OBJ_S_C_GSD_SYMW        4 | 
|---|
| 267 | #define OBJ_S_C_GSD_EPMW        5 | 
|---|
| 268 | #define OBJ_S_C_GSD_PROW        6 | 
|---|
| 269 | #define OBJ_S_C_GSD_IDC 7 | 
|---|
| 270 | #define OBJ_S_C_GSD_ENV 8 | 
|---|
| 271 | #define OBJ_S_C_GSD_LSY 9 | 
|---|
| 272 | #define OBJ_S_C_GSD_LEPM        10 | 
|---|
| 273 | #define OBJ_S_C_GSD_LPRO        11 | 
|---|
| 274 | #define OBJ_S_C_GSD_SPSC        12 | 
|---|
| 275 | #define OBJ_S_C_TIR     2 | 
|---|
| 276 | #define OBJ_S_C_EOM     3 | 
|---|
| 277 | #define OBJ_S_C_DBG     4 | 
|---|
| 278 | #define OBJ_S_C_TBT     5 | 
|---|
| 279 | #define OBJ_S_C_LNK     6 | 
|---|
| 280 | #define OBJ_S_C_EOMW    7 | 
|---|
| 281 | #define OBJ_S_C_MAXRECTYP       7 | 
|---|
| 282 | #define OBJ_S_K_SUBTYP  1 | 
|---|
| 283 | #define OBJ_S_C_SUBTYP  1 | 
|---|
| 284 | #define OBJ_S_C_MAXRECSIZ       2048 | 
|---|
| 285 | #define OBJ_S_C_STRLVL  0 | 
|---|
| 286 | #define OBJ_S_C_SYMSIZ  31 | 
|---|
| 287 | #define OBJ_S_C_STOREPLIM       -1 | 
|---|
| 288 | #define OBJ_S_C_PSCALILIM       9 | 
|---|
| 289 |  | 
|---|
| 290 |  | 
|---|
| 291 | #define MHD_S_C_MHD     0 | 
|---|
| 292 | #define MHD_S_C_LNM     1 | 
|---|
| 293 | #define MHD_S_C_SRC     2 | 
|---|
| 294 | #define MHD_S_C_TTL     3 | 
|---|
| 295 | #define MHD_S_C_CPR     4 | 
|---|
| 296 | #define MHD_S_C_MTC     5 | 
|---|
| 297 | #define MHD_S_C_GTX     6 | 
|---|
| 298 | #define MHD_S_C_MAXHDRTYP       6 | 
|---|
| 299 |  | 
|---|
| 300 |  | 
|---|
| 301 | #define GSD_S_K_ENTRIES 1 | 
|---|
| 302 | #define GSD_S_C_ENTRIES 1 | 
|---|
| 303 | #define GSD_S_C_PSC     0 | 
|---|
| 304 | #define GSD_S_C_SYM     1 | 
|---|
| 305 | #define GSD_S_C_EPM     2 | 
|---|
| 306 | #define GSD_S_C_PRO     3 | 
|---|
| 307 | #define GSD_S_C_SYMW    4 | 
|---|
| 308 | #define GSD_S_C_EPMW    5 | 
|---|
| 309 | #define GSD_S_C_PROW    6 | 
|---|
| 310 | #define GSD_S_C_IDC     7 | 
|---|
| 311 | #define GSD_S_C_ENV     8 | 
|---|
| 312 | #define GSD_S_C_LSY     9 | 
|---|
| 313 | #define GSD_S_C_LEPM    10 | 
|---|
| 314 | #define GSD_S_C_LPRO    11 | 
|---|
| 315 | #define GSD_S_C_SPSC    12 | 
|---|
| 316 | #define GSD_S_C_SYMV    13 | 
|---|
| 317 | #define GSD_S_C_EPMV    14 | 
|---|
| 318 | #define GSD_S_C_PROV    15 | 
|---|
| 319 | #define GSD_S_C_MAXRECTYP       15 | 
|---|
| 320 |  | 
|---|
| 321 |  | 
|---|
| 322 | #define GSY_S_M_WEAK    1 | 
|---|
| 323 | #define GSY_S_M_DEF     2 | 
|---|
| 324 | #define GSY_S_M_UNI     4 | 
|---|
| 325 | #define GSY_S_M_REL     8 | 
|---|
| 326 |  | 
|---|
| 327 | #define LSY_S_M_DEF     2 | 
|---|
| 328 | #define LSY_S_M_REL     8 | 
|---|
| 329 |  | 
|---|
| 330 | #define ENV_S_M_DEF     1 | 
|---|
| 331 | #define ENV_S_M_NESTED  2 | 
|---|
| 332 |  | 
|---|
| 333 |  | 
|---|
| 334 | #define GPS_S_M_PIC     1 | 
|---|
| 335 | #define GPS_S_M_LIB     2 | 
|---|
| 336 | #define GPS_S_M_OVR     4 | 
|---|
| 337 | #define GPS_S_M_REL     8 | 
|---|
| 338 | #define GPS_S_M_GBL     16 | 
|---|
| 339 | #define GPS_S_M_SHR     32 | 
|---|
| 340 | #define GPS_S_M_EXE     64 | 
|---|
| 341 | #define GPS_S_M_RD      128 | 
|---|
| 342 | #define GPS_S_M_WRT     256 | 
|---|
| 343 | #define GPS_S_M_VEC     512 | 
|---|
| 344 | #define GPS_S_K_NAME    9 | 
|---|
| 345 | #define GPS_S_C_NAME    9 | 
|---|
| 346 |  | 
|---|
| 347 |  | 
|---|
| 348 | #define TIR_S_C_STA_GBL 0 | 
|---|
| 349 | #define TIR_S_C_STA_SB  1 | 
|---|
| 350 | #define TIR_S_C_STA_SW  2 | 
|---|
| 351 | #define TIR_S_C_STA_LW  3 | 
|---|
| 352 | #define TIR_S_C_STA_PB  4 | 
|---|
| 353 | #define TIR_S_C_STA_PW  5 | 
|---|
| 354 | #define TIR_S_C_STA_PL  6 | 
|---|
| 355 | #define TIR_S_C_STA_UB  7 | 
|---|
| 356 | #define TIR_S_C_STA_UW  8 | 
|---|
| 357 | #define TIR_S_C_STA_BFI 9 | 
|---|
| 358 | #define TIR_S_C_STA_WFI 10 | 
|---|
| 359 | #define TIR_S_C_STA_LFI 11 | 
|---|
| 360 | #define TIR_S_C_STA_EPM 12 | 
|---|
| 361 | #define TIR_S_C_STA_CKARG       13 | 
|---|
| 362 | #define TIR_S_C_STA_WPB 14 | 
|---|
| 363 | #define TIR_S_C_STA_WPW 15 | 
|---|
| 364 | #define TIR_S_C_STA_WPL 16 | 
|---|
| 365 | #define TIR_S_C_STA_LSY 17 | 
|---|
| 366 | #define TIR_S_C_STA_LIT 18 | 
|---|
| 367 | #define TIR_S_C_STA_LEPM        19 | 
|---|
| 368 | #define TIR_S_C_MAXSTACOD       19 | 
|---|
| 369 | #define TIR_S_C_MINSTOCOD       20 | 
|---|
| 370 | #define TIR_S_C_STO_SB  20 | 
|---|
| 371 | #define TIR_S_C_STO_SW  21 | 
|---|
| 372 | #define TIR_S_C_STO_L   22 | 
|---|
| 373 | #define TIR_S_C_STO_BD  23 | 
|---|
| 374 | #define TIR_S_C_STO_WD  24 | 
|---|
| 375 | #define TIR_S_C_STO_LD  25 | 
|---|
| 376 | #define TIR_S_C_STO_LI  26 | 
|---|
| 377 | #define TIR_S_C_STO_PIDR        27 | 
|---|
| 378 | #define TIR_S_C_STO_PICR        28 | 
|---|
| 379 | #define TIR_S_C_STO_RSB 29 | 
|---|
| 380 | #define TIR_S_C_STO_RSW 30 | 
|---|
| 381 | #define TIR_S_C_STO_RL  31 | 
|---|
| 382 | #define TIR_S_C_STO_VPS 32 | 
|---|
| 383 | #define TIR_S_C_STO_USB 33 | 
|---|
| 384 | #define TIR_S_C_STO_USW 34 | 
|---|
| 385 | #define TIR_S_C_STO_RUB 35 | 
|---|
| 386 | #define TIR_S_C_STO_RUW 36 | 
|---|
| 387 | #define TIR_S_C_STO_B   37 | 
|---|
| 388 | #define TIR_S_C_STO_W   38 | 
|---|
| 389 | #define TIR_S_C_STO_RB  39 | 
|---|
| 390 | #define TIR_S_C_STO_RW  40 | 
|---|
| 391 | #define TIR_S_C_STO_RIVB        41 | 
|---|
| 392 | #define TIR_S_C_STO_PIRR        42 | 
|---|
| 393 | #define TIR_S_C_MAXSTOCOD       42 | 
|---|
| 394 | #define TIR_S_C_MINOPRCOD       50 | 
|---|
| 395 | #define TIR_S_C_OPR_NOP 50 | 
|---|
| 396 | #define TIR_S_C_OPR_ADD 51 | 
|---|
| 397 | #define TIR_S_C_OPR_SUB 52 | 
|---|
| 398 | #define TIR_S_C_OPR_MUL 53 | 
|---|
| 399 | #define TIR_S_C_OPR_DIV 54 | 
|---|
| 400 | #define TIR_S_C_OPR_AND 55 | 
|---|
| 401 | #define TIR_S_C_OPR_IOR 56 | 
|---|
| 402 | #define TIR_S_C_OPR_EOR 57 | 
|---|
| 403 | #define TIR_S_C_OPR_NEG 58 | 
|---|
| 404 | #define TIR_S_C_OPR_COM 59 | 
|---|
| 405 | #define TIR_S_C_OPR_INSV        60 | 
|---|
| 406 | #define TIR_S_C_OPR_ASH 61 | 
|---|
| 407 | #define TIR_S_C_OPR_USH 62 | 
|---|
| 408 | #define TIR_S_C_OPR_ROT 63 | 
|---|
| 409 | #define TIR_S_C_OPR_SEL 64 | 
|---|
| 410 | #define TIR_S_C_OPR_REDEF       65 | 
|---|
| 411 | #define TIR_S_C_OPR_DFLIT       66 | 
|---|
| 412 | #define TIR_S_C_MAXOPRCOD       66 | 
|---|
| 413 | #define TIR_S_C_MINCTLCOD       80 | 
|---|
| 414 | #define TIR_S_C_CTL_SETRB       80 | 
|---|
| 415 | #define TIR_S_C_CTL_AUGRB       81 | 
|---|
| 416 | #define TIR_S_C_CTL_DFLOC       82 | 
|---|
| 417 | #define TIR_S_C_CTL_STLOC       83 | 
|---|
| 418 | #define TIR_S_C_CTL_STKDL       84 | 
|---|
| 419 | #define TIR_S_C_MAXCTLCOD       84 | 
|---|
| 420 |  | 
|---|
| 421 |  | 
|---|
| 422 | /* | 
|---|
| 423 | *      Debugger symbol definitions:  These are done by hand, as no | 
|---|
| 424 | *                                      machine-readable version seems | 
|---|
| 425 | *                                      to be available. | 
|---|
| 426 | */ | 
|---|
| 427 | #define DST_S_C_C         7     /* Language == "C"      */ | 
|---|
| 428 | #define DST_S_C_CXX      15     /* Language == "C++"    */ | 
|---|
| 429 | #define DST_S_C_VERSION 153 | 
|---|
| 430 | #define DST_S_C_SOURCE  155     /* Source file          */ | 
|---|
| 431 | #define DST_S_C_PROLOG  162 | 
|---|
| 432 | #define DST_S_C_BLKBEG  176     /* Beginning of block   */ | 
|---|
| 433 | #define DST_S_C_BLKEND  177     /* End of block */ | 
|---|
| 434 | #define DST_S_C_ENTRY   181 | 
|---|
| 435 | #define DST_S_C_PSECT   184 | 
|---|
| 436 | #define DST_S_C_LINE_NUM        185     /* Line Number          */ | 
|---|
| 437 | #define DST_S_C_LBLORLIT        186 | 
|---|
| 438 | #define DST_S_C_LABEL   187 | 
|---|
| 439 | #define DST_S_C_MODBEG  188     /* Beginning of module  */ | 
|---|
| 440 | #define DST_S_C_MODEND  189     /* End of module        */ | 
|---|
| 441 | #define DST_S_C_RTNBEG  190     /* Beginning of routine */ | 
|---|
| 442 | #define DST_S_C_RTNEND  191     /* End of routine       */ | 
|---|
| 443 | #define DST_S_C_DELTA_PC_W      1       /* Incr PC      */ | 
|---|
| 444 | #define DST_S_C_INCR_LINUM      2       /* Incr Line #  */ | 
|---|
| 445 | #define DST_S_C_INCR_LINUM_W    3       /* Incr Line #  */ | 
|---|
| 446 | #define DST_S_C_SET_LINUM_INCR  4 | 
|---|
| 447 | #define DST_S_C_SET_LINUM_INCR_W        5 | 
|---|
| 448 | #define DST_S_C_RESET_LINUM_INCR        6 | 
|---|
| 449 | #define DST_S_C_BEG_STMT_MODE   7 | 
|---|
| 450 | #define DST_S_C_END_STMT_MODE   8 | 
|---|
| 451 | #define DST_S_C_SET_LINE_NUM    9       /* Set Line #   */ | 
|---|
| 452 | #define DST_S_C_SET_PC          10 | 
|---|
| 453 | #define DST_S_C_SET_PC_W                11 | 
|---|
| 454 | #define DST_S_C_SET_PC_L                12 | 
|---|
| 455 | #define DST_S_C_SET_STMTNUM     13 | 
|---|
| 456 | #define DST_S_C_TERM            14      /* End of lines */ | 
|---|
| 457 | #define DST_S_C_TERM_W          15      /* End of lines */ | 
|---|
| 458 | #define DST_S_C_SET_ABS_PC      16      /* Set PC       */ | 
|---|
| 459 | #define DST_S_C_DELTA_PC_L      17      /* Incr PC      */ | 
|---|
| 460 | #define DST_S_C_INCR_LINUM_L    18      /* Incr Line #  */ | 
|---|
| 461 | #define DST_S_C_SET_LINUM_B     19      /* Set Line #   */ | 
|---|
| 462 | #define DST_S_C_SET_LINUM_L     20      /* Set Line #   */ | 
|---|
| 463 | #define DST_S_C_TERM_L          21      /* End of lines */ | 
|---|
| 464 | /* these are used with DST_S_C_SOURCE */ | 
|---|
| 465 | #define DST_S_C_SRC_DECLFILE     1      /* Declare source file */ | 
|---|
| 466 | #define DST_S_C_SRC_SETFILE      2      /* Set source file */ | 
|---|
| 467 | #define DST_S_C_SRC_SETREC_L     3      /* Set record, longword value */ | 
|---|
| 468 | #define DST_S_C_SRC_SETREC_W     4      /* Set record, word value */ | 
|---|
| 469 | #define DST_S_C_SRC_DEFLINES_W  10      /* # of line, word counter */ | 
|---|
| 470 | #define DST_S_C_SRC_DEFLINES_B  11      /* # of line, byte counter */ | 
|---|
| 471 | #define DST_S_C_SRC_FORMFEED    16      /* ^L counts as a record */ | 
|---|
| 472 | /* the following are the codes for the various data types.  Anything not on | 
|---|
| 473 | * the list is included under 'advanced_type' | 
|---|
| 474 | */ | 
|---|
| 475 | #define DBG_S_C_UCHAR           0x02 | 
|---|
| 476 | #define DBG_S_C_USINT           0x03 | 
|---|
| 477 | #define DBG_S_C_ULINT           0x04 | 
|---|
| 478 | #define DBG_S_C_UQUAD           0x05 | 
|---|
| 479 | #define DBG_S_C_SCHAR           0x06 | 
|---|
| 480 | #define DBG_S_C_SSINT           0x07 | 
|---|
| 481 | #define DBG_S_C_SLINT           0x08 | 
|---|
| 482 | #define DBG_S_C_SQUAD           0x09 | 
|---|
| 483 | #define DBG_S_C_REAL4           0x0a | 
|---|
| 484 | #define DBG_S_C_REAL8           0x0b            /* D_float double */ | 
|---|
| 485 | #define DBG_S_C_COMPLX4         0x0c            /* 2xF_float complex float */ | 
|---|
| 486 | #define DBG_S_C_COMPLX8         0x0d            /* 2xD_float complex double */ | 
|---|
| 487 | #define DBG_S_C_REAL8_G         0x1b            /* G_float double */ | 
|---|
| 488 | #define DBG_S_C_COMPLX8_G       0x1d            /* 2xG_float complex double */ | 
|---|
| 489 | #define DBG_S_C_FUNCTION_ADDR   0x17 | 
|---|
| 490 | #define DBG_S_C_ADVANCED_TYPE   0xa3 | 
|---|
| 491 | /*  Some of these are just for future reference.  [pr] | 
|---|
| 492 | */ | 
|---|
| 493 | #define DBG_S_C_UBITA           0x01    /* unsigned, aligned bit field */ | 
|---|
| 494 | #define DBG_S_C_UBITU           0x22    /* unsigned, unaligned bit field */ | 
|---|
| 495 | #define DBG_S_C_SBITA           0x29    /* signed, aligned bit field */ | 
|---|
| 496 | #define DBG_S_C_SBITU           0x2a    /* signed, unaligned bit field */ | 
|---|
| 497 | #define DBG_S_C_CSTRING         0x2e    /* asciz ('\0' terminated) string */ | 
|---|
| 498 | #define DBG_S_C_WCHAR           0x38    /* wchar_t */ | 
|---|
| 499 | /*  These are descriptor class codes. | 
|---|
| 500 | */ | 
|---|
| 501 | #define DSC_K_CLASS_S           0x01    /* static (fixed length) */ | 
|---|
| 502 | #define DSC_K_CLASS_D           0x02    /* dynamic string (not via malloc!) */ | 
|---|
| 503 | #define DSC_K_CLASS_A           0x04    /* array */ | 
|---|
| 504 | #define DSC_K_CLASS_UBS         0x0d    /* unaligned bit string */ | 
|---|
| 505 | /*  These are the codes that are used to generate the definitions of struct | 
|---|
| 506 | *  union and enum records | 
|---|
| 507 | */ | 
|---|
| 508 | #define DBG_S_C_ENUM_ITEM               0xa4 | 
|---|
| 509 | #define DBG_S_C_ENUM_START              0xa5 | 
|---|
| 510 | #define DBG_S_C_ENUM_END                0xa6 | 
|---|
| 511 | #define DBG_S_C_STRUCT_ITEM             DST_K_VFLAGS_BITOFFS    /* 0xff */ | 
|---|
| 512 | #define DBG_S_C_STRUCT_START            0xab | 
|---|
| 513 | #define DBG_S_C_STRUCT_END              0xac | 
|---|
| 514 | #define DST_K_TYPSPEC                   0xaf            /* type specification */ | 
|---|
| 515 | /* These codes are used in the generation of the symbol definition records | 
|---|
| 516 | */ | 
|---|
| 517 | #define DST_K_VFLAGS_NOVAL              0x80    /* struct definition only */ | 
|---|
| 518 | #define DST_K_VFLAGS_DSC                0xfa    /* descriptor used */ | 
|---|
| 519 | #define DST_K_VFLAGS_TVS                0xfb    /* trailing value specified */ | 
|---|
| 520 | #define DST_K_VS_FOLLOWS                0xfd    /* value spec follows */ | 
|---|
| 521 | #define DST_K_VFLAGS_BITOFFS            0xff    /* value contains bit offset */ | 
|---|
| 522 | #define DST_K_VALKIND_LITERAL   0 | 
|---|
| 523 | #define DST_K_VALKIND_ADDR      1 | 
|---|
| 524 | #define DST_K_VALKIND_DESC      2 | 
|---|
| 525 | #define DST_K_VALKIND_REG       3 | 
|---|
| 526 | #define DST_K_REG_VAX_AP        0x0c    /* R12 */ | 
|---|
| 527 | #define DST_K_REG_VAX_FP        0x0d    /* R13 */ | 
|---|
| 528 | #define DST_K_REG_VAX_SP        0x0e    /* R14 */ | 
|---|
| 529 | #define DST_V_VALKIND           0       /* offset of valkind field */ | 
|---|
| 530 | #define DST_V_INDIRECT          2       /* offset to indirect bit */ | 
|---|
| 531 | #define DST_V_DISP              3       /* offset to displacement bit */ | 
|---|
| 532 | #define DST_V_REGNUM            4       /* offset to register number */ | 
|---|
| 533 | #define DST_M_INDIRECT          (1<<DST_V_INDIRECT) | 
|---|
| 534 | #define DST_M_DISP              (1<<DST_V_DISP) | 
|---|
| 535 | #define DBG_C_FUNCTION_PARAM    /* 0xc9 */      \ | 
|---|
| 536 | (DST_K_VALKIND_ADDR|DST_M_DISP|(DST_K_REG_VAX_AP<<DST_V_REGNUM)) | 
|---|
| 537 | #define DBG_C_LOCAL_SYM         /* 0xd9 */      \ | 
|---|
| 538 | (DST_K_VALKIND_ADDR|DST_M_DISP|(DST_K_REG_VAX_FP<<DST_V_REGNUM)) | 
|---|
| 539 | /* Kinds of value specifications | 
|---|
| 540 | */ | 
|---|
| 541 | #define DST_K_VS_ALLOC_SPLIT    3       /* split lifetime */ | 
|---|
| 542 | /* Kinds of type specifications | 
|---|
| 543 | */ | 
|---|
| 544 | #define DST_K_TS_ATOM           0x01    /* atomic type specification */ | 
|---|
| 545 | #define DST_K_TS_DSC            0x02    /* descriptor type spec */ | 
|---|
| 546 | #define DST_K_TS_IND            0x03    /* indirect type specification */ | 
|---|
| 547 | #define DST_K_TS_TPTR           0x04    /* typed pointer type spec */ | 
|---|
| 548 | #define DST_K_TS_PTR            0x05    /* pointer type spec */ | 
|---|
| 549 | #define DST_K_TS_ARRAY          0x07    /* array type spec */ | 
|---|
| 550 | #define DST_K_TS_NOV_LENG       0x0e    /* novel length type spec */ | 
|---|
| 551 | /*  These are the codes that are used in the suffix records to determine the | 
|---|
| 552 | *  actual data type | 
|---|
| 553 | */ | 
|---|
| 554 | #define DBG_S_C_BASIC                   DST_K_TS_ATOM | 
|---|
| 555 | #define DBG_S_C_BASIC_ARRAY             DST_K_TS_DSC | 
|---|
| 556 | #define DBG_S_C_STRUCT                  DST_K_TS_IND | 
|---|
| 557 | #define DBG_S_C_POINTER                 DST_K_TS_TPTR | 
|---|
| 558 | #define DBG_S_C_VOID                    DST_K_TS_PTR | 
|---|
| 559 | #define DBG_S_C_COMPLEX_ARRAY           DST_K_TS_ARRAY | 
|---|
| 560 |  | 
|---|
| 561 | #endif  /* WANT_VMS_OBJ_DEFS */ | 
|---|