+ case ETIR__C_STC_LDA_GBL:
+ /* ALPHA_R_LDA */
+
+ /* 211 Store-conditional BSR or Hint at global address
+ arg: none. */
+
+ case ETIR__C_STC_BOH_GBL:
+ /* Currentl ignored. */
+ break;
+
+ /* 213 Store-conditional NOP,BSR or HINT at global address
+ arg: none. */
+
+ case ETIR__C_STC_NBH_GBL:
+
+ /* 206 Store-conditional NOP at pect + offset
+ arg: none. */
+
+ case ETIR__C_STC_NOP_PS:
+
+ /* 208 Store-conditional BSR at pect + offset
+ arg: none. */
+
+ case ETIR__C_STC_BSR_PS:
+
+ /* 210 Store-conditional LDA at psect + offset
+ arg: none. */
+
+ case ETIR__C_STC_LDA_PS:
+
+ /* 212 Store-conditional BSR or Hint at pect + offset
+ arg: none. */
+
+ case ETIR__C_STC_BOH_PS:
+
+ /* 214 Store-conditional NOP, BSR or HINT at psect + offset
+ arg: none. */
+ case ETIR__C_STC_NBH_PS:
+ _bfd_error_handler (_("%s: not supported"),
+ _bfd_vms_etir_name (cmd));
+ return FALSE;
+ break;
+
+ /* Det relocation base: pop stack, set image location counter
+ arg: none. */
+ case ETIR__C_CTL_SETRB:
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (!(rel1 & RELC_SEC_BASE))
+ abort ();
+ image_set_ptr (abfd, op1, rel1 & RELC_MASK, info);
+ break;
+
+ /* Augment relocation base: increment image location counter by offset
+ arg: lw offset value. */
+ case ETIR__C_CTL_AUGRB:
+ if (cmd_length < 4)
+ goto corrupt_etir;
+ op1 = bfd_getl32 (ptr);
+ image_inc_ptr (abfd, op1);
+ break;
+
+ /* Define location: pop index, save location counter under index
+ arg: none. */
+ case ETIR__C_CTL_DFLOC:
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (rel1 != RELC_NONE)
+ goto bad_context;
+ if (!dst_define_location (abfd, op1))
+ return FALSE;
+ break;
+
+ /* Set location: pop index, restore location counter from index
+ arg: none. */
+ case ETIR__C_CTL_STLOC:
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (rel1 != RELC_NONE)
+ goto bad_context;
+ if (!dst_restore_location (abfd, op1))
+ {
+ bfd_set_error (bfd_error_bad_value);
+ _bfd_error_handler (_("invalid %s"), "ETIR__C_CTL_STLOC");
+ return FALSE;
+ }
+ break;
+
+ /* Stack defined location: pop index, push location counter from index
+ arg: none. */
+ case ETIR__C_CTL_STKDL:
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (rel1 != RELC_NONE)
+ goto bad_context;
+ if (!dst_retrieve_location (abfd, &op1))
+ {
+ bfd_set_error (bfd_error_bad_value);
+ _bfd_error_handler (_("invalid %s"), "ETIR__C_CTL_STKDL");
+ return FALSE;
+ }
+ if (!_bfd_vms_push (abfd, op1, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_NOP: /* No-op. */
+ break;
+
+ case ETIR__C_OPR_ADD: /* Add. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 == RELC_NONE && rel2 != RELC_NONE)
+ rel1 = rel2;
+ else if (rel1 != RELC_NONE && rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op1 + op2, rel1))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_SUB: /* Subtract. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 == RELC_NONE && rel2 != RELC_NONE)
+ rel1 = rel2;
+ else if ((rel1 & RELC_SEC_BASE) && (rel2 & RELC_SEC_BASE))
+ {
+ op1 = alpha_vms_fix_sec_rel (abfd, info, rel1, op1);
+ op2 = alpha_vms_fix_sec_rel (abfd, info, rel2, op2);
+ rel1 = RELC_NONE;
+ }
+ else if (rel1 != RELC_NONE && rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op2 - op1, rel1))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_MUL: /* Multiply. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op1 * op2, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_DIV: /* Divide. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ goto bad_context;
+ if (op1 == 0)
+ {
+ /* Divide by zero is supposed to give a result of zero,
+ and a non-fatal warning message. */
+ _bfd_error_handler (_("%s divide by zero"), "ETIR__C_OPR_DIV");
+ if (!_bfd_vms_push (abfd, 0, RELC_NONE))
+ return FALSE;
+ }
+ else
+ {
+ if (!_bfd_vms_push (abfd, op2 / op1, RELC_NONE))
+ return FALSE;
+ }
+ break;
+
+ case ETIR__C_OPR_AND: /* Logical AND. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op1 & op2, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_IOR: /* Logical inclusive OR. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op1 | op2, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_EOR: /* Logical exclusive OR. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, op1 ^ op2, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_NEG: /* Negate. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (rel1 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, -op1, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_COM: /* Complement. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (rel1 != RELC_NONE)
+ goto bad_context;
+ if (!_bfd_vms_push (abfd, ~op1, RELC_NONE))
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_ASH: /* Arithmetic shift. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (rel1 != RELC_NONE || rel2 != RELC_NONE)
+ {
+ bad_context:
+ _bfd_error_handler (_("invalid use of %s with contexts"),
+ _bfd_vms_etir_name (cmd));
+ return FALSE;
+ }
+ if ((int)op2 < 0) /* Shift right. */
+ op1 >>= -(int)op2;
+ else /* Shift left. */
+ op1 <<= (int)op2;
+ if (!_bfd_vms_push (abfd, op1, RELC_NONE)) /* FIXME: sym. */
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_INSV: /* Insert field. */
+ case ETIR__C_OPR_USH: /* Unsigned shift. */
+ case ETIR__C_OPR_ROT: /* Rotate. */
+ case ETIR__C_OPR_REDEF: /* Redefine symbol to current location. */
+ case ETIR__C_OPR_DFLIT: /* Define a literal. */
+ _bfd_error_handler (_("%s: not supported"),
+ _bfd_vms_etir_name (cmd));
+ return FALSE;
+ break;
+
+ case ETIR__C_OPR_SEL: /* Select. */
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ if (op1 & 0x01L)
+ {
+ if (!_bfd_vms_pop (abfd, &op1, &rel1))
+ return FALSE;
+ }
+ else
+ {
+ if (!_bfd_vms_pop (abfd, &op1, &rel1)
+ || !_bfd_vms_pop (abfd, &op2, &rel2))
+ return FALSE;
+ if (!_bfd_vms_push (abfd, op1, rel1))
+ return FALSE;
+ }
+ break;
+
+ default:
+ _bfd_error_handler (_("reserved cmd %d"), cmd);
+ return FALSE;
+ break;
+ }
+
+ ptr += cmd_length;
+ }
+
+ return TRUE;
+}
+
+/* Process EDBG/ETBT record.
+ Return TRUE on success, FALSE on error */
+
+static bfd_boolean
+vms_slurp_debug (bfd *abfd)
+{
+ asection *section = PRIV (dst_section);
+
+ if (section == NULL)
+ {