Add c-format tags to translatable strings with more than one argument-using formattin...
[deliverable/binutils-gdb.git] / bfd / vms-alpha.c
index 8b98560743731a3d8983e9800cd8c4407c589a38..57e697587f126c97f12345925759740ae9b74a4b 100644 (file)
@@ -1,6 +1,5 @@
 /* vms.c -- BFD back-end for EVAX (openVMS/Alpha) files.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
 
    Initial version written by Klaus Kaempf (kkaempf@rmi.de)
    Major rewrite by Adacore.
@@ -331,10 +330,6 @@ struct vms_private_data_struct
 
   /* linkage index counter used by conditional store commands */
   unsigned int vms_linkage_index;
-
-  /* see tc-alpha.c of gas for a description.  */
-  int flag_hash_long_names;    /* -+, hash instead of truncate */
-  int flag_show_after_trunc;   /* -H, show hashing/truncation */
 };
 
 #define PRIV2(abfd, name) \
@@ -369,9 +364,9 @@ struct vms_section_data_struct
   ((struct vms_section_data_struct *)sec->used_by_bfd)
 
 /* To be called from the debugger.  */
-struct vms_private_data_struct *bfd_vms_get_data (bfd *abfd);
+struct vms_private_data_struct *bfd_vms_get_data (bfd *);
 
-static int vms_get_remaining_object_record (bfd *abfd, int read_so_far);
+static int vms_get_remaining_object_record (bfd *, unsigned int);
 static bfd_boolean _bfd_vms_slurp_object_records (bfd * abfd);
 static void alpha_vms_add_fixup_lp (struct bfd_link_info *, bfd *, bfd *);
 static void alpha_vms_add_fixup_ca (struct bfd_link_info *, bfd *, bfd *);
@@ -379,8 +374,8 @@ static void alpha_vms_add_fixup_qr (struct bfd_link_info *, bfd *, bfd *,
                                     bfd_vma);
 static void alpha_vms_add_fixup_lr (struct bfd_link_info *, unsigned int,
                                     bfd_vma);
-static void alpha_vms_add_lw_reloc (struct bfd_link_info *info);
-static void alpha_vms_add_qw_reloc (struct bfd_link_info *info);
+static void alpha_vms_add_lw_reloc (struct bfd_link_info *);
+static void alpha_vms_add_qw_reloc (struct bfd_link_info *);
 
 struct vector_type
 {
@@ -526,9 +521,11 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset)
       asection *section;
       flagword bfd_flags;
 
+      /* PR 17512: file: 3d9e9fe9.  */
+      if (offset >= PRIV (recrd.rec_size))
+       return FALSE;
       eisd = (struct vms_eisd *)(PRIV (recrd.rec) + offset);
       rec_size = bfd_getl32 (eisd->eisdsize);
-
       if (rec_size == 0)
         break;
 
@@ -793,7 +790,7 @@ _bfd_vms_get_object_record (bfd *abfd)
    Return the size of the record or 0 on failure.  */
 
 static int
-vms_get_remaining_object_record (bfd *abfd, int read_so_far)
+vms_get_remaining_object_record (bfd *abfd, unsigned int read_so_far)
 {
   unsigned int to_read;
 
@@ -829,6 +826,9 @@ vms_get_remaining_object_record (bfd *abfd, int read_so_far)
         return 0;
       PRIV (recrd.buf_size) = to_read;
     }
+  /* PR 17512: file: 025-1974-0.004.  */
+  else if (to_read <= read_so_far)
+    return 0;
 
   /* Read the remaining record.  */
   to_read -= read_so_far;
@@ -859,9 +859,12 @@ _bfd_vms_slurp_ehdr (bfd *abfd)
 {
   unsigned char *ptr;
   unsigned char *vms_rec;
+  unsigned char *end;
   int subtype;
 
   vms_rec = PRIV (recrd.rec);
+  /* PR 17512: file: 62736583.  */
+  end = PRIV (recrd.buf) + PRIV (recrd.buf_size);
 
   vms_debug2 ((2, "HDR/EMH\n"));
 
@@ -873,28 +876,42 @@ _bfd_vms_slurp_ehdr (bfd *abfd)
     {
     case EMH__C_MHD:
       /* Module header.  */
+      if (vms_rec + 21 >= end)
+       goto fail;
       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);
+      if ((vms_rec + 20 + vms_rec[20] + 1) >= end)
+       goto fail;
       PRIV (hdr_data).hdr_t_name   = _bfd_vms_save_counted_string (vms_rec + 20);
       ptr = vms_rec + 20 + vms_rec[20] + 1;
+      if ((ptr + *ptr + 1) >= end)
+       goto fail;
       PRIV (hdr_data).hdr_t_version =_bfd_vms_save_counted_string (ptr);
       ptr += *ptr + 1;
+      if (ptr + 17 >= end)
+       goto fail;
       PRIV (hdr_data).hdr_t_date = _bfd_vms_save_sized_string (ptr, 17);
       break;
 
     case EMH__C_LNM:
+      if (vms_rec + PRIV (recrd.rec_size - 6) > end)
+       goto fail;
       PRIV (hdr_data).hdr_c_lnm =
         _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6));
       break;
 
     case EMH__C_SRC:
+      if (vms_rec + PRIV (recrd.rec_size - 6) > end)
+       goto fail;
       PRIV (hdr_data).hdr_c_src =
         _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6));
       break;
 
     case EMH__C_TTL:
+      if (vms_rec + PRIV (recrd.rec_size - 6) > end)
+       goto fail;
       PRIV (hdr_data).hdr_c_ttl =
         _bfd_vms_save_sized_string (vms_rec, PRIV (recrd.rec_size - 6));
       break;
@@ -905,6 +922,7 @@ _bfd_vms_slurp_ehdr (bfd *abfd)
       break;
 
     default:
+    fail:
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
     }
@@ -1296,7 +1314,7 @@ _bfd_vms_slurp_egsd (bfd *abfd)
        case EGSD__C_SYMM:
        case EGSD__C_SYMV:
        default:
-         (*_bfd_error_handler) (_("Unknown EGSD subtype %d"), gsd_type);
+         _bfd_error_handler (_("Unknown EGSD subtype %d"), gsd_type);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -1327,7 +1345,7 @@ _bfd_vms_push (bfd *abfd, bfd_vma val, unsigned int reloc)
   if (PRIV (stackptr) >= STACKSIZE)
     {
       bfd_set_error (bfd_error_bad_value);
-      (*_bfd_error_handler) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr));
+      _bfd_error_handler (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr));
       exit (1);
     }
 }
@@ -1340,7 +1358,7 @@ _bfd_vms_pop (bfd *abfd, bfd_vma *val, unsigned int *rel)
   if (PRIV (stackptr) == 0)
     {
       bfd_set_error (bfd_error_bad_value);
-      (*_bfd_error_handler) (_("Stack underflow in _bfd_vms_pop"));
+      _bfd_error_handler (_("Stack underflow in _bfd_vms_pop"));
       exit (1);
     }
   PRIV (stackptr)--;
@@ -1577,7 +1595,7 @@ _bfd_vms_etir_name (int cmd)
 
     default:
       /* These names have not yet been added to this switch statement.  */
-      (*_bfd_error_handler) (_("unknown ETIR command %d"), cmd);
+      _bfd_error_handler (_("unknown ETIR command %d"), cmd);
     }
 
   return NULL;
@@ -1623,9 +1641,8 @@ _bfd_vms_get_value (bfd *abfd, const unsigned char *ascic,
     *vma = 0;
   else
     {
-      if (!(*info->callbacks->undefined_symbol)
-          (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE))
-        abort ();
+      (*info->callbacks->undefined_symbol)
+       (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE);
       *vma = 0;
     }
 }
@@ -1764,8 +1781,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
             psect = bfd_getl32 (ptr);
             if ((unsigned int) psect >= PRIV (section_count))
               {
-                (*_bfd_error_handler) (_("bad section index in %s"),
-                                       _bfd_vms_etir_name (cmd));
+               _bfd_error_handler (_("bad section index in %s"),
+                                   _bfd_vms_etir_name (cmd));
                 bfd_set_error (bfd_error_bad_value);
                 return FALSE;
               }
@@ -1777,8 +1794,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
         case ETIR__C_STA_LI:
         case ETIR__C_STA_MOD:
         case ETIR__C_STA_CKARG:
-          (*_bfd_error_handler) (_("unsupported STA cmd %s"),
-                                 _bfd_vms_etir_name (cmd));
+         _bfd_error_handler (_("unsupported STA cmd %s"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -1953,14 +1970,14 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
         case ETIR__C_STO_RB:
         case ETIR__C_STO_AB:
         case ETIR__C_STO_LP_PSB:
-          (*_bfd_error_handler) (_("%s: not supported"),
-                                 _bfd_vms_etir_name (cmd));
+         _bfd_error_handler (_("%s: not supported"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
         case ETIR__C_STO_HINT_GBL:
         case ETIR__C_STO_HINT_PS:
-          (*_bfd_error_handler) (_("%s: not implemented"),
-                                 _bfd_vms_etir_name (cmd));
+         _bfd_error_handler (_("%s: not implemented"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -1984,8 +2001,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
              lw        psect index
              qw        offset.  */
         case ETIR__C_STC_PS:
-          (*_bfd_error_handler) (_("%s: not supported"),
-                                 _bfd_vms_etir_name (cmd));
+         _bfd_error_handler (_("%s: not supported"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2075,8 +2092,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
           /* 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));
+         _bfd_error_handler (_("%s: not supported"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2215,8 +2232,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
           if (rel1 != RELC_NONE || rel2 != RELC_NONE)
             {
             bad_context:
-              (*_bfd_error_handler) (_("invalid use of %s with contexts"),
-                                     _bfd_vms_etir_name (cmd));
+             _bfd_error_handler (_("invalid use of %s with contexts"),
+                                 _bfd_vms_etir_name (cmd));
               return FALSE;
             }
           if ((int)op2 < 0)            /* Shift right.  */
@@ -2231,8 +2248,8 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
         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));
+         _bfd_error_handler (_("%s: not supported"),
+                             _bfd_vms_etir_name (cmd));
           return FALSE;
           break;
 
@@ -2249,7 +2266,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info)
           break;
 
         default:
-          (*_bfd_error_handler) (_("reserved cmd %d"), cmd);
+         _bfd_error_handler (_("reserved cmd %d"), cmd);
           return FALSE;
           break;
         }
@@ -2334,7 +2351,7 @@ _bfd_vms_slurp_eeom (bfd *abfd)
   PRIV (eom_data).eom_w_comcod = bfd_getl16 (eeom->comcod);
   if (PRIV (eom_data).eom_w_comcod > 1)
     {
-      (*_bfd_error_handler) (_("Object module NOT error-free !\n"));
+      _bfd_error_handler (_("Object module NOT error-free !\n"));
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -2479,10 +2496,7 @@ alpha_vms_object_p (bfd *abfd)
   PRIV (recrd.rec) = buf;
 
   if (bfd_bread (buf, test_len, abfd) != test_len)
-    {
-      bfd_set_error (bfd_error_file_truncated);
-      goto error_ret;
-    }
+    goto err_wrong_format;
 
   /* Is it an image?  */
   if ((bfd_getl32 (buf) == EIHD__K_MAJORID)
@@ -2507,7 +2521,6 @@ alpha_vms_object_p (bfd *abfd)
           if (buf == NULL)
             {
               PRIV (recrd.buf) = NULL;
-              bfd_set_error (bfd_error_no_memory);
               goto error_ret;
             }
           PRIV (recrd.buf) = buf;
@@ -2522,10 +2535,7 @@ alpha_vms_object_p (bfd *abfd)
       while (remaining > 0)
         {
           if (bfd_bread (buf + read_so_far, to_read, abfd) != to_read)
-            {
-              bfd_set_error (bfd_error_file_truncated);
-              goto err_wrong_format;
-            }
+           goto err_wrong_format;
 
           read_so_far += to_read;
           remaining -= to_read;
@@ -2536,6 +2546,9 @@ alpha_vms_object_p (bfd *abfd)
       /* Reset the record pointer.  */
       PRIV (recrd.rec) = buf;
 
+      /* PR 17512: file: 7d7c57c2.  */
+      if (PRIV (recrd.rec_size) < sizeof (struct vms_eihd))
+       goto error_ret;
       vms_debug2 ((2, "file type is image\n"));
 
       if (_bfd_vms_slurp_eihd (abfd, &eisd_offset, &eihs_offset) != TRUE)
@@ -2686,88 +2699,6 @@ _bfd_vms_write_eeom (bfd *abfd)
   return TRUE;
 }
 
-/* This hash routine borrowed from GNU-EMACS, and strengthened
-   slightly.  ERY.  */
-
-static int
-hash_string (const char *ptr)
-{
-  const unsigned char *p = (unsigned char *) ptr;
-  const unsigned char *end = p + strlen (ptr);
-  unsigned char c;
-  int hash = 0;
-
-  while (p != end)
-    {
-      c = *p++;
-      hash = ((hash << 3) + (hash << 15) + (hash >> 28) + c);
-    }
-  return hash;
-}
-
-/* Generate a length-hashed VMS symbol name (limited to maxlen chars).  */
-
-static char *
-_bfd_vms_length_hash_symbol (bfd *abfd, const char *in, int maxlen)
-{
-  unsigned long result;
-  int in_len;
-  char *new_name;
-  const char *old_name;
-  int i;
-  static char outbuf[EOBJ__C_SYMSIZ + 1];
-  char *out = outbuf;
-
-#if VMS_DEBUG
-  vms_debug (4, "_bfd_vms_length_hash_symbol \"%s\"\n", in);
-#endif
-
-  if (maxlen > EOBJ__C_SYMSIZ)
-    maxlen = EOBJ__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", (int)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;
-}
-
 static void
 vector_grow1 (struct vector_type *vec, size_t elsz)
 {
@@ -3241,7 +3172,6 @@ alpha_vms_write_exec (bfd *abfd)
       for (i = 0; i < PRIV (gsd_sym_count); i++)
         {
           struct vms_symbol_entry *sym = PRIV (syms)[i];
-          char *hash;
           bfd_vma val;
           bfd_vma ep;
 
@@ -3268,8 +3198,7 @@ alpha_vms_write_exec (bfd *abfd)
          _bfd_vms_output_quad (recwr, ep);
          _bfd_vms_output_quad (recwr, val);
          _bfd_vms_output_long (recwr, 0);
-          hash = _bfd_vms_length_hash_symbol (abfd, sym->name, EOBJ__C_SYMSIZ);
-          _bfd_vms_output_counted (recwr, hash);
+          _bfd_vms_output_counted (recwr, sym->name);
           _bfd_vms_output_end_subrec (recwr);
           if ((i % 5) == 4)
             _bfd_vms_output_end (abfd, recwr);
@@ -3364,8 +3293,6 @@ _bfd_vms_write_egsd (bfd *abfd)
          else if ((*sname == 'l') && (strcmp (sname, "lcomm") == 0))
            sname = EVAX_LOCAL_NAME;
        }
-      else
-       sname = _bfd_vms_length_hash_symbol (abfd, sname, EOBJ__C_SECSIZ);
 
       if (bfd_is_com_section (section))
        new_flags = (EGPS__V_OVR | EGPS__V_REL | EGPS__V_GBL | EGPS__V_RD
@@ -3405,18 +3332,13 @@ _bfd_vms_write_egsd (bfd *abfd)
 
   for (symnum = 0; symnum < abfd->symcount; symnum++)
     {
-      char *hash;
-
       symbol = abfd->outsymbols[symnum];
       old_flags = symbol->flags;
 
       /* Work-around a missing feature:  consider __main as the main entry
          point.  */
-      if (*(symbol->name) == '_')
-       {
-         if (strcmp (symbol->name, "__main") == 0)
-           bfd_set_start_address (abfd, (bfd_vma)symbol->value);
-       }
+      if (symbol->name[0] == '_' && strcmp (symbol->name, "__main") == 0)
+       bfd_set_start_address (abfd, (bfd_vma)symbol->value);
 
       /* Only put in the GSD the global and the undefined symbols.  */
       if (old_flags & BSF_FILE)
@@ -3509,8 +3431,7 @@ _bfd_vms_write_egsd (bfd *abfd)
          _bfd_vms_output_long (recwr, ca_psindx);
          _bfd_vms_output_long (recwr, psindx);
        }
-      hash = _bfd_vms_length_hash_symbol (abfd, symbol->name, EOBJ__C_SYMSIZ);
-      _bfd_vms_output_counted (recwr, hash);
+      _bfd_vms_output_counted (recwr, symbol->name);
 
       _bfd_vms_output_end_subrec (recwr);
     }
@@ -3528,8 +3449,6 @@ _bfd_vms_write_ehdr (bfd *abfd)
 {
   asymbol *symbol;
   unsigned int symnum;
-  int had_case = 0;
-  int had_file = 0;
   struct vms_rec_wr *recwr = &PRIV (recwr);
 
   vms_debug2 ((2, "vms_write_ehdr (%p)\n", abfd));
@@ -3549,22 +3468,9 @@ _bfd_vms_write_ehdr (bfd *abfd)
 
       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 (recwr, (unsigned char *) symbol->name,
                                (int) strlen (symbol->name));
-         if (had_case)
-           break;
-         had_file = 1;
+         break;
        }
     }
 
@@ -3765,7 +3671,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
          unsigned int irel;
 
          if (section->reloc_count == 0)
-           (*_bfd_error_handler)
+           _bfd_error_handler
              (_("SEC_RELOC with no relocs in section %s"), section->name);
 
 #if VMS_DEBUG
@@ -3800,7 +3706,6 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
              asection *sec = sym->section;
              bfd_boolean defer = defer_reloc_p (rptr);
              unsigned int slen;
-             char *hash;
 
              if (pass2_in_progress)
                {
@@ -3819,8 +3724,8 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
 
                  /* Regular relocs are intertwined with binary data.  */
                  if (curr_addr > addr)
-                   (*_bfd_error_handler) (_("Size error in section %s"),
-                                          section->name);
+                   _bfd_error_handler (_("Size error in section %s"),
+                                       section->name);
                  size = addr - curr_addr;
                  sto_imm (abfd, section, size, curr_data, curr_addr);
                  curr_data += size;
@@ -3839,13 +3744,11 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                    {
                      bfd_vma addend = rptr->addend;
                      slen = strlen ((char *) sym->name);
-                     hash = _bfd_vms_length_hash_symbol
-                        (abfd, sym->name, EOBJ__C_SYMSIZ);
                      etir_output_check (abfd, section, curr_addr, slen);
                      if (addend)
                        {
                          _bfd_vms_output_begin_subrec (recwr, ETIR__C_STA_GBL);
-                         _bfd_vms_output_counted (recwr, hash);
+                         _bfd_vms_output_counted (recwr, sym->name);
                          _bfd_vms_output_end_subrec (recwr);
                          _bfd_vms_output_begin_subrec (recwr, ETIR__C_STA_LW);
                          _bfd_vms_output_long (recwr, (unsigned long) addend);
@@ -3859,7 +3762,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                        {
                          _bfd_vms_output_begin_subrec
                             (recwr, ETIR__C_STO_GBL_LW);
-                         _bfd_vms_output_counted (recwr, hash);
+                         _bfd_vms_output_counted (recwr, sym->name);
                          _bfd_vms_output_end_subrec (recwr);
                        }
                    }
@@ -3894,13 +3797,11 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                    {
                      bfd_vma addend = rptr->addend;
                      slen = strlen ((char *) sym->name);
-                     hash = _bfd_vms_length_hash_symbol
-                        (abfd, sym->name, EOBJ__C_SYMSIZ);
                      etir_output_check (abfd, section, curr_addr, slen);
                      if (addend)
                        {
                          _bfd_vms_output_begin_subrec (recwr, ETIR__C_STA_GBL);
-                         _bfd_vms_output_counted (recwr, hash);
+                         _bfd_vms_output_counted (recwr, sym->name);
                          _bfd_vms_output_end_subrec (recwr);
                          _bfd_vms_output_begin_subrec (recwr, ETIR__C_STA_QW);
                          _bfd_vms_output_quad (recwr, addend);
@@ -3913,7 +3814,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                      else
                        {
                          _bfd_vms_output_begin_subrec (recwr, ETIR__C_STO_GBL);
-                         _bfd_vms_output_counted (recwr, hash);
+                         _bfd_vms_output_counted (recwr, sym->name);
                          _bfd_vms_output_end_subrec (recwr);
                        }
                    }
@@ -3950,20 +3851,16 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                    (recwr, (unsigned long) rptr->addend);
                   if (rptr->addend > PRIV (vms_linkage_index))
                     PRIV (vms_linkage_index) = rptr->addend;
-                 hash = _bfd_vms_length_hash_symbol
-                    (abfd, sym->name, EOBJ__C_SYMSIZ);
-                 _bfd_vms_output_counted (recwr, hash);
+                 _bfd_vms_output_counted (recwr, sym->name);
                  _bfd_vms_output_byte (recwr, 0);
                  _bfd_vms_output_end_subrec (recwr);
                  break;
 
                case ALPHA_R_CODEADDR:
                  slen = strlen ((char *) sym->name);
-                 hash = _bfd_vms_length_hash_symbol
-                    (abfd, sym->name, EOBJ__C_SYMSIZ);
                  etir_output_check (abfd, section, curr_addr, slen);
                  _bfd_vms_output_begin_subrec (recwr, ETIR__C_STO_CA);
-                 _bfd_vms_output_counted (recwr, hash);
+                 _bfd_vms_output_counted (recwr, sym->name);
                  _bfd_vms_output_end_subrec (recwr);
                  break;
 
@@ -3981,14 +3878,12 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                  _bfd_vms_output_long
                    (recwr, (unsigned long) section->target_index);
                  _bfd_vms_output_quad (recwr, rptr->addend);
-                 _bfd_vms_output_counted
-                   (recwr, _bfd_vms_length_hash_symbol
-                     (abfd, udata->origname, EOBJ__C_SYMSIZ));
+                 _bfd_vms_output_counted (recwr, udata->origname);
                  _bfd_vms_output_end_subrec (recwr);
                  break;
 
                case ALPHA_R_BSR:
-                 (*_bfd_error_handler) (_("Spurious ALPHA_R_BSR reloc"));
+                 _bfd_error_handler (_("Spurious ALPHA_R_BSR reloc"));
                  break;
 
                case ALPHA_R_LDA:
@@ -4006,9 +3901,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                  _bfd_vms_output_long
                    (recwr, (unsigned long) udata->bsym->section->target_index);
                  _bfd_vms_output_quad (recwr, rptr->addend);
-                 _bfd_vms_output_counted
-                   (recwr, _bfd_vms_length_hash_symbol
-                     (abfd, udata->origname, EOBJ__C_SYMSIZ));
+                 _bfd_vms_output_counted (recwr, udata->origname);
                  _bfd_vms_output_end_subrec (recwr);
                  break;
 
@@ -4026,15 +3919,13 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
                  _bfd_vms_output_long
                    (recwr, (unsigned long) section->target_index);
                  _bfd_vms_output_quad (recwr, rptr->addend);
-                 _bfd_vms_output_counted
-                   (recwr, _bfd_vms_length_hash_symbol
-                     (abfd, udata->origname, EOBJ__C_SYMSIZ));
+                 _bfd_vms_output_counted (recwr, udata->origname);
                  _bfd_vms_output_end_subrec (recwr);
                  break;
 
                default:
-                 (*_bfd_error_handler) (_("Unhandled relocation %s"),
-                                        rptr->howto->name);
+                 _bfd_error_handler (_("Unhandled relocation %s"),
+                                     rptr->howto->name);
                  break;
                }
 
@@ -4046,8 +3937,8 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED)
            {
              /* Output rest of section.  */
              if (curr_addr > section->size)
-               (*_bfd_error_handler) (_("Size error in section %s"),
-                                      section->name);
+               _bfd_error_handler (_("Size error in section %s"),
+                                   section->name);
              size = section->size - curr_addr;
              sto_imm (abfd, section, size, curr_data, curr_addr);
              curr_data += size;
@@ -4323,8 +4214,8 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr,
                  break;
 
                default:
-                 (*_bfd_error_handler) (_("unknown source command %d"),
-                                        cmd);
+                 _bfd_error_handler (_("unknown source command %d"),
+                                     cmd);
                  cmd_length = 2;
                  break;
                }
@@ -4383,31 +4274,31 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr,
                  break;
 
                case DST__K_SET_LINUM_INCR:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_LINUM_INCR not implemented"));
                  cmd_length = 2;
                  break;
 
                case DST__K_SET_LINUM_INCR_W:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_LINUM_INCR_W not implemented"));
                  cmd_length = 3;
                  break;
 
                case DST__K_RESET_LINUM_INCR:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_RESET_LINUM_INCR not implemented"));
                  cmd_length = 1;
                  break;
 
                case DST__K_BEG_STMT_MODE:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_BEG_STMT_MODE not implemented"));
                  cmd_length = 1;
                  break;
 
                case DST__K_END_STMT_MODE:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_END_STMT_MODE not implemented"));
                  cmd_length = 1;
                  break;
@@ -4434,25 +4325,25 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr,
                  break;
 
                case DST__K_SET_PC:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_PC not implemented"));
                  cmd_length = 2;
                  break;
 
                case DST__K_SET_PC_W:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_PC_W not implemented"));
                  cmd_length = 3;
                  break;
 
                case DST__K_SET_PC_L:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_PC_L not implemented"));
                  cmd_length = 5;
                  break;
 
                case DST__K_SET_STMTNUM:
-                 (*_bfd_error_handler)
+                 _bfd_error_handler
                    (_("DST__K_SET_STMTNUM not implemented"));
                  cmd_length = 2;
                  break;
@@ -4496,8 +4387,7 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr,
                    }
                  else
                    {
-                     (*_bfd_error_handler) (_("unknown line command %d"),
-                                            cmd);
+                     _bfd_error_handler (_("unknown line command %d"), cmd);
                      cmd_length = 2;
                    }
                  break;
@@ -4709,10 +4599,14 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr,
    location.  */
 
 static bfd_boolean
-_bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section,
-                               asymbol **symbols ATTRIBUTE_UNUSED,
-                               bfd_vma offset, const char **file,
-                               const char **func, unsigned int *line)
+_bfd_vms_find_nearest_line (bfd *abfd,
+                           asymbol **symbols ATTRIBUTE_UNUSED,
+                           asection *section,
+                           bfd_vma offset,
+                           const char **file,
+                           const char **func,
+                           unsigned int *line,
+                           unsigned int *discriminator)
 {
   struct module *module;
 
@@ -4722,6 +4616,8 @@ _bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section,
   *file = NULL;
   *func = NULL;
   *line = 0;
+  if (discriminator)
+    *discriminator = 0;
 
   /* We can't do anything if there is no DST (debug symbol table).  */
   if (PRIV (dst_section) == NULL)
@@ -4949,7 +4845,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
             case ETIR__C_CTL_SETRB:
               if (prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler)
+                 _bfd_error_handler
+                   /* xgettext:c-format */
                     (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd),
                      _bfd_vms_etir_name (cmd));
                   return FALSE;
@@ -4966,7 +4863,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
                 {
                   if (prev_cmd != ETIR__C_STA_GBL)
                     {
-                      (*_bfd_error_handler)
+                     _bfd_error_handler
+                       /* xgettext:c-format */
                         (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (cmd),
                          _bfd_vms_etir_name (ETIR__C_STA_LW));
                       return FALSE;
@@ -4980,7 +4878,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
                                 /* ALPHA_R_REFQUAD und_section, step 2 */
               if (prev_cmd != -1 && prev_cmd != ETIR__C_STA_GBL)
                 {
-                  (*_bfd_error_handler)
+                 _bfd_error_handler
+                   /* xgettext:c-format */
                     (_("Unknown reloc %s + %s"), _bfd_vms_etir_name (cmd),
                      _bfd_vms_etir_name (ETIR__C_STA_QW));
                   return FALSE;
@@ -4996,9 +4895,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
                   && prev_cmd != ETIR__C_STA_LW
                   && prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_LW));
+                 /* xgettext:c-format */
+                 _bfd_error_handler (_("Unknown reloc %s + %s"),
+                                     _bfd_vms_etir_name (prev_cmd),
+                                     _bfd_vms_etir_name (ETIR__C_STO_LW));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_32;
@@ -5008,9 +4908,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
                                 /* ALPHA_R_REFQUAD abs_section, step 2 */
               if (prev_cmd != ETIR__C_OPR_ADD && prev_cmd != ETIR__C_STA_QW)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_QW));
+                 /* xgettext:c-format */
+                 _bfd_error_handler (_("Unknown reloc %s + %s"),
+                                     _bfd_vms_etir_name (prev_cmd),
+                                     _bfd_vms_etir_name (ETIR__C_STO_QW));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_64;
@@ -5019,9 +4920,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
             case ETIR__C_STO_OFF: /* ALPHA_R_REFQUAD others, step 2 */
               if (prev_cmd != ETIR__C_STA_PQ)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_STO_OFF));
+                 /* xgettext:c-format */
+                 _bfd_error_handler (_("Unknown reloc %s + %s"),
+                                     _bfd_vms_etir_name (prev_cmd),
+                                     _bfd_vms_etir_name (ETIR__C_STO_OFF));
                   return FALSE;
                 }
               reloc_code = BFD_RELOC_64;
@@ -5031,9 +4933,10 @@ alpha_vms_slurp_relocs (bfd *abfd)
                                   /* ALPHA_R_REFQUAD und_section, step 3 */
               if (prev_cmd != ETIR__C_STA_LW && prev_cmd != ETIR__C_STA_QW)
                 {
-                  (*_bfd_error_handler) (_("Unknown reloc %s + %s"),
-                                         _bfd_vms_etir_name (prev_cmd),
-                                         _bfd_vms_etir_name (ETIR__C_OPR_ADD));
+                 /* xgettext:c-format */
+                 _bfd_error_handler (_("Unknown reloc %s + %s"),
+                                     _bfd_vms_etir_name (prev_cmd),
+                                     _bfd_vms_etir_name (ETIR__C_OPR_ADD));
                   return FALSE;
                 }
               prev_cmd = ETIR__C_OPR_ADD;
@@ -5086,8 +4989,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
               continue;
 
             default:
-              (*_bfd_error_handler) (_("Unknown reloc %s"),
-                                     _bfd_vms_etir_name (cmd));
+             _bfd_error_handler (_("Unknown reloc %s"),
+                                 _bfd_vms_etir_name (cmd));
               return FALSE;
             }
 
@@ -5099,14 +5002,14 @@ alpha_vms_slurp_relocs (bfd *abfd)
             /* Get section to which the relocation applies.  */
             if (cur_psect < 0 || cur_psect > (int)PRIV (section_count))
               {
-                (*_bfd_error_handler) (_("Invalid section index in ETIR"));
+               _bfd_error_handler (_("Invalid section index in ETIR"));
                 return FALSE;
               }
 
             sec = PRIV (sections)[cur_psect];
             if (sec == bfd_abs_section_ptr)
               {
-                (*_bfd_error_handler) (_("Relocation for non-REL psect"));
+               _bfd_error_handler (_("Relocation for non-REL psect"));
                 return FALSE;
               }
 
@@ -5153,8 +5056,8 @@ alpha_vms_slurp_relocs (bfd *abfd)
                     }
                 if (sym == NULL)
                   {
-                    (*_bfd_error_handler) (_("Unknown symbol in command %s"),
-                                           _bfd_vms_etir_name (cmd));
+                   _bfd_error_handler (_("Unknown symbol in command %s"),
+                                       _bfd_vms_etir_name (cmd));
                     reloc->sym_ptr_ptr = NULL;
                   }
                 else
@@ -5554,7 +5457,7 @@ alpha_vms_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
       case BFD_RELOC_ALPHA_LDA:                alpha_type = ALPHA_R_LDA;       break;
       case BFD_RELOC_ALPHA_BOH:                alpha_type = ALPHA_R_BOH;       break;
       default:
-       (*_bfd_error_handler) ("reloc (%d) is *UNKNOWN*", code);
+       _bfd_error_handler (_("reloc (%d) is *UNKNOWN*"), code);
        return NULL;
     }
   vms_debug2 ((2, "reloc is %s\n", alpha_howto_table[alpha_type].name));
@@ -5668,6 +5571,7 @@ evax_bfd_print_emh (FILE *file, unsigned char *rec, unsigned int rec_len)
 
   subtype = (unsigned)bfd_getl16 (emh->subtyp);
 
+  /* xgettext:c-format */
   fprintf (file, _("  EMH %u (len=%u): "), subtype, rec_len);
 
   switch (subtype)
@@ -5817,6 +5721,7 @@ evax_bfd_print_egsd (FILE *file, unsigned char *rec, unsigned int rec_len)
       type = (unsigned)bfd_getl16 (e->gsdtyp);
       len = (unsigned)bfd_getl16 (e->gsdsiz);
 
+      /* xgettext:c-format */
       fprintf (file, _("  EGSD entry %2u (type: %u, len: %u): "),
                n, type, len);
       n++;
@@ -6019,18 +5924,22 @@ evax_bfd_print_hex (FILE *file, const char *pfx,
 static void
 evax_bfd_print_etir_stc_ir (FILE *file, const unsigned char *buf, int is_ps)
 {
+  /* xgettext:c-format */
   fprintf (file, _("    linkage index: %u, replacement insn: 0x%08x\n"),
            (unsigned)bfd_getl32 (buf),
            (unsigned)bfd_getl32 (buf + 16));
+  /* xgettext:c-format */
   fprintf (file, _("    psect idx 1: %u, offset 1: 0x%08x %08x\n"),
            (unsigned)bfd_getl32 (buf + 4),
            (unsigned)bfd_getl32 (buf + 12),
            (unsigned)bfd_getl32 (buf + 8));
+  /* xgettext:c-format */
   fprintf (file, _("    psect idx 2: %u, offset 2: 0x%08x %08x\n"),
            (unsigned)bfd_getl32 (buf + 20),
            (unsigned)bfd_getl32 (buf + 28),
            (unsigned)bfd_getl32 (buf + 24));
   if (is_ps)
+    /* xgettext:c-format */
     fprintf (file, _("    psect idx 3: %u, offset 3: 0x%08x %08x\n"),
              (unsigned)bfd_getl32 (buf + 32),
              (unsigned)bfd_getl32 (buf + 40),
@@ -6044,8 +5953,9 @@ evax_bfd_print_etir (FILE *file, const char *name,
                      unsigned char *rec, unsigned int rec_len)
 {
   unsigned int off = sizeof (struct vms_egsd);
-  unsigned int sec_len;
+  unsigned int sec_len = 0;
 
+  /* xgettext:c-format */
   fprintf (file, _("  %s (len=%u+%u):\n"), name,
            (unsigned)(rec_len - sizeof (struct vms_eobjrec)),
            (unsigned)sizeof (struct vms_eobjrec));
@@ -6061,6 +5971,7 @@ evax_bfd_print_etir (FILE *file, const char *name,
       size = bfd_getl16 (etir->size);
       buf = rec + off + sizeof (struct vms_etir);
 
+      /* xgettext:c-format */
       fprintf (file, _("   (type: %3u, size: 4+%3u): "), type, size - 4);
       switch (type)
         {
@@ -6079,6 +5990,7 @@ evax_bfd_print_etir (FILE *file, const char *name,
           break;
         case ETIR__C_STA_PQ:
           fprintf (file, _("STA_PQ (stack psect base + offset)\n"));
+         /* xgettext:c-format */
           fprintf (file, _("    psect: %u, offset: 0x%08x %08x\n"),
                    (unsigned)bfd_getl32 (buf + 0),
                    (unsigned)bfd_getl32 (buf + 8),
@@ -6215,6 +6127,7 @@ evax_bfd_print_etir (FILE *file, const char *name,
         case ETIR__C_STC_LP_PSB:
           fprintf (file,
                    _("STC_LP_PSB (store cond linkage pair + signature)\n"));
+         /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, procedure: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           buf += 4 + 1 + buf[4];
@@ -6222,17 +6135,20 @@ evax_bfd_print_etir (FILE *file, const char *name,
           break;
         case ETIR__C_STC_GBL:
           fprintf (file, _("STC_GBL (store cond global)\n"));
+         /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, global: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           break;
         case ETIR__C_STC_GCA:
           fprintf (file, _("STC_GCA (store cond code address)\n"));
+         /* xgettext:c-format */
           fprintf (file, _("   linkage index: %u, procedure name: %.*s\n"),
                    (unsigned)bfd_getl32 (buf), buf[4], buf + 5);
           break;
         case ETIR__C_STC_PS:
           fprintf (file, _("STC_PS (store cond psect + offset)\n"));
           fprintf (file,
+                  /* xgettext:c-format */
                    _("   linkage index: %u, psect: %u, offset: 0x%08x %08x\n"),
                    (unsigned)bfd_getl32 (buf),
                    (unsigned)bfd_getl32 (buf + 4),
@@ -6450,6 +6366,7 @@ evax_bfd_print_relocation_records (FILE *file, const unsigned char *rel,
         break;
       base = bfd_getl32 (rel + 4);
 
+      /* xgettext:c-format */
       fprintf (file, _("  bitcount: %u, base addr: 0x%08x\n"),
                count, base);
 
@@ -6463,6 +6380,7 @@ evax_bfd_print_relocation_records (FILE *file, const unsigned char *rel,
           val = bfd_getl32 (rel);
           rel += 4;
 
+         /* xgettext:c-format */
           fprintf (file, _("   bitmap: 0x%08x (count: %u):\n"), val, count);
 
           for (k = 0; k < 32; k++)
@@ -6495,11 +6413,13 @@ evax_bfd_print_address_fixups (FILE *file, const unsigned char *rel)
       count = bfd_getl32 (rel + 0);
       if (count == 0)
         return;
+      /* xgettext:c-format */
       fprintf (file, _("  image %u (%u entries)\n"),
                (unsigned)bfd_getl32 (rel + 4), count);
       rel += 8;
       for (j = 0; j < count; j++)
         {
+         /* xgettext:c-format */
           fprintf (file, _("   offset: 0x%08x, val: 0x%08x\n"),
                    (unsigned)bfd_getl32 (rel + 0),
                    (unsigned)bfd_getl32 (rel + 4));
@@ -6521,6 +6441,7 @@ evax_bfd_print_reference_fixups (FILE *file, const unsigned char *rel)
       count = bfd_getl32 (rel + 0);
       if (count == 0)
         break;
+      /* xgettext:c-format */
       fprintf (file, _("  image %u (%u entries), offsets:\n"),
                (unsigned)bfd_getl32 (rel + 4), count);
       rel += 8;
@@ -6654,6 +6575,7 @@ evax_bfd_print_desc (const unsigned char *buf, int indent, FILE *file)
     }
   else
     {
+      /* xgettext:c-format */
       fprintf (file, _("class: %u, dtype: %u, length: %u, pointer: 0x%08x\n"),
                bclass, dtype, len, pointer);
       switch (bclass)
@@ -6669,10 +6591,12 @@ evax_bfd_print_desc (const unsigned char *buf, int indent, FILE *file)
                      evax_bfd_get_dsc_name (dsc->dtype));
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+                    /* xgettext:c-format */
                      _("dimct: %u, aflags: 0x%02x, digits: %u, scale: %u\n"),
                      dsc->dimct, dsc->aflags, dsc->digits, dsc->scale);
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+                    /* xgettext:c-format */
                      _("arsize: %u, a0: 0x%08x\n"),
                      (unsigned)bfd_getl32 (dsc->arsize),
                      (unsigned)bfd_getl32 (dsc->a0));
@@ -6682,7 +6606,7 @@ evax_bfd_print_desc (const unsigned char *buf, int indent, FILE *file)
             for (i = 0; i < dsc->dimct; i++)
               {
                 evax_bfd_print_indent (indent + 2, file);
-                fprintf (file, _("[%u]: %u\n"), i + 1,
+                fprintf (file, "[%u]: %u\n", i + 1,
                          (unsigned)bfd_getl32 (b));
                 b += 4;
               }
@@ -6692,6 +6616,7 @@ evax_bfd_print_desc (const unsigned char *buf, int indent, FILE *file)
             for (i = 0; i < dsc->dimct; i++)
               {
                 evax_bfd_print_indent (indent + 2, file);
+               /* xgettext:c-format */
                 fprintf (file, _("[%u]: Lower: %u, upper: %u\n"), i + 1,
                          (unsigned)bfd_getl32 (b + 0),
                          (unsigned)bfd_getl32 (b + 4));
@@ -6708,6 +6633,7 @@ evax_bfd_print_desc (const unsigned char *buf, int indent, FILE *file)
                      evax_bfd_get_dsc_name (ubs->dtype));
             evax_bfd_print_indent (indent + 1, file);
             fprintf (file,
+                    /* xgettext:c-format */
                      _("base: %u, pos: %u\n"),
                      (unsigned)bfd_getl32 (ubs->base),
                      (unsigned)bfd_getl32 (ubs->pos));
@@ -6728,6 +6654,7 @@ evax_bfd_print_valspec (const unsigned char *buf, int indent, FILE *file)
   unsigned int len = 5;
 
   evax_bfd_print_indent (indent, file);
+  /* xgettext:c-format */
   fprintf (file, _("vflags: 0x%02x, value: 0x%08x "), vflags, value);
   buf += 5;
 
@@ -6756,6 +6683,7 @@ evax_bfd_print_valspec (const unsigned char *buf, int indent, FILE *file)
       fprintf (file, _("(at bit offset %u)\n"), value);
       break;
     default:
+      /* xgettext:c-format */
       fprintf (file, _("(reg: %u, disp: %u, indir: %u, kind: "),
                (vflags & DST__K_REGNUM_MASK) >> DST__K_REGNUM_SHIFT,
                vflags & DST__K_DISP ? 1 : 0,
@@ -6788,24 +6716,26 @@ evax_bfd_print_typspec (const unsigned char *buf, int indent, FILE *file)
   unsigned int len = (unsigned)bfd_getl16 (buf);
 
   evax_bfd_print_indent (indent, file);
-  fprintf (file, ("len: %2u, kind: %2u "), len, kind);
+  /* xgettext:c-format */
+  fprintf (file, _("len: %2u, kind: %2u "), len, kind);
   buf += 3;
   switch (kind)
     {
     case DST__K_TS_ATOM:
-      fprintf (file, ("atomic, type=0x%02x %s\n"),
+    /* xgettext:c-format */
+      fprintf (file, _("atomic, type=0x%02x %s\n"),
                buf[0], evax_bfd_get_dsc_name (buf[0]));
       break;
     case DST__K_TS_IND:
-      fprintf (file, ("indirect, defined at 0x%08x\n"),
+      fprintf (file, _("indirect, defined at 0x%08x\n"),
                (unsigned)bfd_getl32 (buf));
       break;
     case DST__K_TS_TPTR:
-      fprintf (file, ("typed pointer\n"));
+      fprintf (file, _("typed pointer\n"));
       evax_bfd_print_typspec (buf, indent + 1, file);
       break;
     case DST__K_TS_PTR:
-      fprintf (file, ("pointer\n"));
+      fprintf (file, _("pointer\n"));
       break;
     case DST__K_TS_ARRAY:
       {
@@ -6813,30 +6743,30 @@ evax_bfd_print_typspec (const unsigned char *buf, int indent, FILE *file)
         unsigned int vec_len;
         unsigned int i;
 
-        fprintf (file, ("array, dim: %u, bitmap: "), buf[0]);
+        fprintf (file, _("array, dim: %u, bitmap: "), buf[0]);
         vec_len = (buf[0] + 1 + 7) / 8;
         for (i = 0; i < vec_len; i++)
           fprintf (file, " %02x", buf[i + 1]);
         fputc ('\n', file);
         vs = buf + 1 + vec_len;
         evax_bfd_print_indent (indent, file);
-        fprintf (file, ("array descriptor:\n"));
+        fprintf (file, _("array descriptor:\n"));
         vs += evax_bfd_print_valspec (vs, indent + 1, file);
         for (i = 0; i < buf[0] + 1U; i++)
           if (buf[1 + i / 8] & (1 << (i % 8)))
             {
               evax_bfd_print_indent (indent, file);
               if (i == 0)
-                fprintf (file, ("type spec for element:\n"));
+                fprintf (file, _("type spec for element:\n"));
               else
-                fprintf (file, ("type spec for subscript %u:\n"), i);
+                fprintf (file, _("type spec for subscript %u:\n"), i);
               evax_bfd_print_typspec (vs, indent + 1, file);
               vs += bfd_getl16 (vs);
             }
       }
       break;
     default:
-      fprintf (file, ("*unhandled*\n"));
+      fprintf (file, _("*unhandled*\n"));
     }
 }
 
@@ -6863,6 +6793,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
         }
       len = bfd_getl16 (dsth.length);
       type = bfd_getl16 (dsth.type);
+      /* xgettext:c-format */
       fprintf (file, _(" type: %3u, len: %3u (at 0x%08x): "),
                type, len, off);
       if (len == 0)
@@ -6931,6 +6862,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
             const char *name = (const char *)buf + sizeof (*dst);
 
             fprintf (file, _("modbeg\n"));
+           /* xgettext:c-format */
             fprintf (file, _("   flags: %d, language: %u, "
                              "major: %u, minor: %u\n"),
                      dst->flags,
@@ -6953,6 +6885,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
             const char *name = (const char *)buf + sizeof (*dst);
 
             fputs (_("rtnbeg\n"), file);
+           /* xgettext:c-format */
             fprintf (file, _("    flags: %u, address: 0x%08x, "
                              "pd-address: 0x%08x\n"),
                      dst->flags,
@@ -6982,6 +6915,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
           {
             struct vms_dst_epilog *dst = (void *)buf;
 
+           /* xgettext:c-format */
             fprintf (file, _("epilog: flags: %u, count: %u\n"),
                      dst->flags, (unsigned)bfd_getl32 (dst->count));
           }
@@ -6991,6 +6925,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
             struct vms_dst_blkbeg *dst = (void *)buf;
             const char *name = (const char *)buf + sizeof (*dst);
 
+           /* xgettext:c-format */
             fprintf (file, _("blkbeg: address: 0x%08x, name: %.*s\n"),
                      (unsigned)bfd_getl32 (dst->address),
                      name[0], name + 1);
@@ -7024,7 +6959,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
 
             fprintf (file, _("recbeg: name: %.*s\n"), name[0], name + 1);
             evax_bfd_print_valspec (buf, 4, file);
-            fprintf (file, ("    len: %u bits\n"),
+            fprintf (file, _("    len: %u bits\n"),
                      (unsigned)bfd_getl32 (name + 1 + name[0]));
           }
           break;
@@ -7032,6 +6967,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
           fprintf (file, _("recend\n"));
           break;
         case DST__K_ENUMBEG:
+         /* xgettext:c-format */
           fprintf (file, _("enumbeg, len: %u, name: %.*s\n"),
                    buf[0], buf[1], buf + 2);
           break;
@@ -7045,9 +6981,9 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
         case DST__K_LABEL:
           {
             struct vms_dst_label *lab = (void *)buf;
-            fprintf (file, ("label, name: %.*s\n"),
+            fprintf (file, _("label, name: %.*s\n"),
                      lab->name[0], lab->name + 1);
-            fprintf (file, ("    address: 0x%08x\n"),
+            fprintf (file, _("    address: 0x%08x\n"),
                      (unsigned)bfd_getl32 (lab->value));
           }
           break;
@@ -7059,6 +6995,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
 
             fprintf (file, _("discontiguous range (nbr: %u)\n"), cnt);
             for (i = 0; i < cnt; i++, rng += 8)
+             /* xgettext:c-format */
               fprintf (file, _("    address: 0x%08x, size: %u\n"),
                        (unsigned)bfd_getl32 (rng),
                        (unsigned)bfd_getl32 (rng + 4));
@@ -7153,6 +7090,7 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
                         fprintf (file, _("delta pc +%-4d"), -cmd);
                         line++;  /* FIXME: curr increment.  */
                         pc += -cmd;
+                       /* xgettext:c-format */
                         fprintf (file, _("    pc: 0x%08x line: %5u\n"),
                                  pc, line);
                         cmdlen = 1;
@@ -7187,10 +7125,12 @@ evax_bfd_print_dst (struct bfd *abfd, unsigned int dst_size, FILE *file)
                       struct vms_dst_src_decl_src *src = (void *)(buf + 1);
                       const char *name;
 
+                     /* xgettext:c-format */
                       fprintf (file, _("   declfile: len: %u, flags: %u, "
                                        "fileid: %u\n"),
                                src->length, src->flags,
                                (unsigned)bfd_getl16 (src->fileid));
+                     /* xgettext:c-format */
                       fprintf (file, _("   rms: cdt: 0x%08x %08x, "
                                        "ebk: 0x%08x, ffb: 0x%04x, "
                                        "rfo: %u\n"),
@@ -7294,9 +7234,11 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
       fprintf (file, _("cannot read EIHD\n"));
       return;
     }
+  /* xgettext:c-format */
   fprintf (file, _("EIHD: (size: %u, nbr blocks: %u)\n"),
            (unsigned)bfd_getl32 (eihd.size),
            (unsigned)bfd_getl32 (eihd.hdrblkcnt));
+  /* xgettext:c-format */
   fprintf (file, _(" majorid: %u, minorid: %u\n"),
            (unsigned)bfd_getl32 (eihd.majorid),
            (unsigned)bfd_getl32 (eihd.minorid));
@@ -7314,6 +7256,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
       name = _("unknown");
       break;
     }
+  /* xgettext:c-format */
   fprintf (file, _(" image type: %u (%s)"), val, name);
 
   val = (unsigned)bfd_getl32 (eihd.subtype);
@@ -7329,12 +7272,14 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
       name = _("unknown");
       break;
     }
+  /* xgettext:c-format */
   fprintf (file, _(", subtype: %u (%s)\n"), val, name);
 
   eisd_off = bfd_getl32 (eihd.isdoff);
   eiha_off = bfd_getl32 (eihd.activoff);
   eihi_off = bfd_getl32 (eihd.imgidoff);
   eihs_off = bfd_getl32 (eihd.symdbgoff);
+  /* xgettext:c-format */
   fprintf (file, _(" offsets: isd: %u, activ: %u, symdbg: %u, "
                    "imgid: %u, patch: %u\n"),
            eisd_off, eiha_off, eihs_off, eihi_off,
@@ -7348,6 +7293,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
                    " version array off: %u\n"),
            eihvn_off);
   fprintf (file,
+          /* xgettext:c-format */
            _(" img I/O count: %u, nbr channels: %u, req pri: %08x%08x\n"),
            (unsigned)bfd_getl32 (eihd.imgiocnt),
            (unsigned)bfd_getl32 (eihd.iochancnt),
@@ -7384,6 +7330,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
   if (val & EIHD__M_EXT_BIND_SECT)
     fprintf (file, " EXT_BIND_SECT");
   fprintf (file, "\n");
+  /* xgettext:c-format */
   fprintf (file, _(" ident: 0x%08x, sysver: 0x%08x, "
                    "match ctrl: %u, symvect_size: %u\n"),
            (unsigned)bfd_getl32 (eihd.ident),
@@ -7396,6 +7343,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
     {
       eihef_off = bfd_getl32 (eihd.ext_fixup_off);
       eihnp_off = bfd_getl32 (eihd.noopt_psect_off);
+      /* xgettext:c-format */
       fprintf (file, _(", ext fixup offset: %u, no_opt psect off: %u"),
                eihef_off, eihnp_off);
     }
@@ -7491,7 +7439,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
                 fputs (_("*unknown*        "), file);
                 break;
               }
-            fprintf (file, _(": %u.%u\n"),
+            fprintf (file, ": %u.%u\n",
                      (unsigned)bfd_getl16 (ver.major),
                      (unsigned)bfd_getl16 (ver.minor));
           }
@@ -7509,18 +7457,23 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
         }
       fprintf (file, _("Image activation:  (size=%u)\n"),
                (unsigned)bfd_getl32 (eiha.size));
+      /* xgettext:c-format */
       fprintf (file, _(" First address : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr1_h),
                (unsigned)bfd_getl32 (eiha.tfradr1));
+      /* xgettext:c-format */
       fprintf (file, _(" Second address: 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr2_h),
                (unsigned)bfd_getl32 (eiha.tfradr2));
+      /* xgettext:c-format */
       fprintf (file, _(" Third address : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr3_h),
                (unsigned)bfd_getl32 (eiha.tfradr3));
+      /* xgettext:c-format */
       fprintf (file, _(" Fourth address: 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.tfradr4_h),
                (unsigned)bfd_getl32 (eiha.tfradr4));
+      /* xgettext:c-format */
       fprintf (file, _(" Shared image  : 0x%08x 0x%08x\n"),
                (unsigned)bfd_getl32 (eiha.inishr_h),
                (unsigned)bfd_getl32 (eiha.inishr));
@@ -7535,6 +7488,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
           fprintf (file, _("cannot read EIHI\n"));
           return;
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image identification: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eihi.majorid),
                (unsigned)bfd_getl32 (eihi.minorid));
@@ -7559,19 +7513,23 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
           fprintf (file, _("cannot read EIHS\n"));
           return;
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image symbol & debug table: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eihs.majorid),
                (unsigned)bfd_getl32 (eihs.minorid));
       dst_vbn = bfd_getl32 (eihs.dstvbn);
       dst_size = bfd_getl32 (eihs.dstsize);
+      /* xgettext:c-format */
       fprintf (file, _(" debug symbol table : vbn: %u, size: %u (0x%x)\n"),
                dst_vbn, dst_size, dst_size);
       gst_vbn = bfd_getl32 (eihs.gstvbn);
       gst_size = bfd_getl32 (eihs.gstsize);
+      /* xgettext:c-format */
       fprintf (file, _(" global symbol table: vbn: %u, records: %u\n"),
                gst_vbn, gst_size);
       dmt_vbn = bfd_getl32 (eihs.dmtvbn);
       dmt_size = bfd_getl32 (eihs.dmtsize);
+      /* xgettext:c-format */
       fprintf (file, _(" debug module table : vbn: %u, size: %u\n"),
                dmt_vbn, dmt_size);
     }
@@ -7595,6 +7553,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
           /* Next block.  */
           eisd_off = (eisd_off + VMS_BLOCK_SIZE) & ~(VMS_BLOCK_SIZE - 1);
         }
+      /* xgettext:c-format */
       fprintf (file, _("Image section descriptor: (major: %u, minor: %u, "
                        "size: %u, offset: %u)\n"),
                (unsigned)bfd_getl32 (eisd.majorid),
@@ -7602,6 +7561,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
                len, eisd_off);
       if (len == 0)
         break;
+      /* xgettext:c-format */
       fprintf (file, _(" section: base: 0x%08x%08x size: 0x%08x\n"),
                (unsigned)bfd_getl32 (eisd.virt_addr + 4),
                (unsigned)bfd_getl32 (eisd.virt_addr + 0),
@@ -7644,6 +7604,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
           eiaf_vbn = bfd_getl32 (eisd.vbn);
           eiaf_size = bfd_getl32 (eisd.secsize);
         }
+      /* xgettext:c-format */
       fprintf (file, _(" vbn: %u, pfc: %u, matchctl: %u type: %u ("),
                (unsigned)bfd_getl32 (eisd.vbn),
                eisd.pfc, eisd.matchctl, eisd.type);
@@ -7673,6 +7634,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
         }
       fputs (_(")\n"), file);
       if (val & EISD__M_GBL)
+       /* xgettext:c-format */
         fprintf (file, _(" ident: 0x%08x, name: %.*s\n"),
                  (unsigned)bfd_getl32 (eisd.ident),
                  eisd.gblnam[0], eisd.gblnam + 1);
@@ -7701,6 +7663,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
             }
           count = bfd_getl16 (dmth.psect_count);
           fprintf (file,
+                  /* xgettext:c-format */
                    _(" module offset: 0x%08x, size: 0x%08x, (%u psects)\n"),
                    (unsigned)bfd_getl32 (dmth.modbeg),
                    (unsigned)bfd_getl32 (dmth.size), count);
@@ -7714,6 +7677,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
                   fprintf (file, _("cannot read DMT psect\n"));
                   return;
                 }
+             /* xgettext:c-format */
               fprintf (file, _("  psect start: 0x%08x, length: %u\n"),
                        (unsigned)bfd_getl32 (dmtp.start),
                        (unsigned)bfd_getl32 (dmtp.length));
@@ -7769,12 +7733,15 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
         }
       eiaf = (struct vms_eiaf *)buf;
       fprintf (file,
+              /* xgettext:c-format */
                _("Image activator fixup: (major: %u, minor: %u)\n"),
                (unsigned)bfd_getl32 (eiaf->majorid),
                (unsigned)bfd_getl32 (eiaf->minorid));
+      /* xgettext:c-format */
       fprintf (file, _("  iaflink : 0x%08x %08x\n"),
                (unsigned)bfd_getl32 (eiaf->iaflink + 0),
                (unsigned)bfd_getl32 (eiaf->iaflink + 4));
+      /* xgettext:c-format */
       fprintf (file, _("  fixuplnk: 0x%08x %08x\n"),
                (unsigned)bfd_getl32 (eiaf->fixuplnk + 0),
                (unsigned)bfd_getl32 (eiaf->fixuplnk + 4));
@@ -7784,22 +7751,27 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
                (unsigned)bfd_getl32 (eiaf->flags));
       qrelfixoff = bfd_getl32 (eiaf->qrelfixoff);
       lrelfixoff = bfd_getl32 (eiaf->lrelfixoff);
+      /* xgettext:c-format */
       fprintf (file, _("  qrelfixoff: %5u, lrelfixoff: %5u\n"),
                qrelfixoff, lrelfixoff);
       qdotadroff = bfd_getl32 (eiaf->qdotadroff);
       ldotadroff = bfd_getl32 (eiaf->ldotadroff);
+      /* xgettext:c-format */
       fprintf (file, _("  qdotadroff: %5u, ldotadroff: %5u\n"),
                qdotadroff, ldotadroff);
       codeadroff = bfd_getl32 (eiaf->codeadroff);
       lpfixoff = bfd_getl32 (eiaf->lpfixoff);
+      /* xgettext:c-format */
       fprintf (file, _("  codeadroff: %5u, lpfixoff  : %5u\n"),
                codeadroff, lpfixoff);
       chgprtoff = bfd_getl32 (eiaf->chgprtoff);
       fprintf (file, _("  chgprtoff : %5u\n"), chgprtoff);
       shrimgcnt = bfd_getl32 (eiaf->shrimgcnt);
       shlstoff = bfd_getl32 (eiaf->shlstoff);
+      /* xgettext:c-format */
       fprintf (file, _("  shlstoff  : %5u, shrimgcnt : %5u\n"),
                shlstoff, shrimgcnt);
+      /* xgettext:c-format */
       fprintf (file, _("  shlextra  : %5u, permctx   : %5u\n"),
                (unsigned)bfd_getl32 (eiaf->shlextra),
                (unsigned)bfd_getl32 (eiaf->permctx));
@@ -7817,6 +7789,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
           for (j = 0; j < shrimgcnt; j++, shl++)
             {
               fprintf (file,
+                      /* xgettext:c-format */
                        _("  %u: size: %u, flags: 0x%02x, name: %.*s\n"),
                        j, shl->size, shl->flags,
                        shl->imgnam[0], shl->imgnam + 1);
@@ -7849,7 +7822,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
         }
       if (lpfixoff != 0)
         {
-          fprintf (file, _(" Linkage Pairs Referece Fixups:\n"));
+          fprintf (file, _(" Linkage Pairs Reference Fixups:\n"));
           evax_bfd_print_reference_fixups (file, buf + lpfixoff);
         }
       if (chgprtoff)
@@ -7863,6 +7836,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
             {
               unsigned int prot = bfd_getl32 (eicp->newprt);
               fprintf (file,
+                      /* xgettext:c-format */
                        _("  base: 0x%08x %08x, size: 0x%08x, prot: 0x%08x "),
                        (unsigned)bfd_getl32 (eicp->baseva + 4),
                        (unsigned)bfd_getl32 (eicp->baseva + 0),
@@ -8304,7 +8278,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
         to include it.  We don't need to check anything.  */
       if (!(*info->callbacks
            ->add_archive_element) (info, element, h->root.string, &element))
-       return FALSE;
+       continue;
       if (!alpha_vms_link_add_object_symbols (element, info))
        return FALSE;
 
@@ -8699,7 +8673,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
   asection *dst;
   asection *dmt;
 
-  if (info->relocatable)
+  if (bfd_link_relocatable (info))
     {
       /* FIXME: we do not yet support relocatable link.  It is not obvious
          how to do it for debug infos.  */
@@ -8759,7 +8733,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
     {
       bfd *startbfd = NULL;
 
-      for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+      for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
         {
           /* Consider only VMS object files.  */
           if (sub->xvec != abfd->xvec)
@@ -8773,6 +8747,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
               && !(PRIV2 (sub, eom_data).eom_b_tfrflg & EEOM__M_WKTFR))
             {
               (*info->callbacks->einfo)
+               /* xgettext:c-format */
                 (_("%P: multiple entry points: in modules %B and %B\n"),
                  startbfd, sub);
               continue;
@@ -8863,7 +8838,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
     dmt = NULL;
 
   /* Read all sections from the inputs.  */
-  for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+  for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
     {
       if (sub->flags & DYNAMIC)
         {
@@ -8914,7 +8889,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
           unsigned int off = 0;
 
           /* For each object file (ie for each module).  */
-          for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+          for (sub = info->input_bfds; sub != NULL; sub = sub->link.next)
             {
               asection *sub_dst;
               struct vms_dmt_header *dmth = NULL;
@@ -9115,12 +9090,13 @@ vms_new_section_hook (bfd * abfd, asection *section)
 {
   bfd_size_type amt;
 
-  vms_debug2 ((1, "vms_new_section_hook (%p, [%d]%s)\n",
+  vms_debug2 ((1, "vms_new_section_hook (%p, [%u]%s)\n",
                abfd, section->index, section->name));
 
-  bfd_set_section_alignment (abfd, section, 0);
+  if (! bfd_set_section_alignment (abfd, section, 0))
+    return FALSE;
 
-  vms_debug2 ((7, "%d: %s\n", section->index, section->name));
+  vms_debug2 ((7, "%u: %s\n", section->index, section->name));
 
   amt = sizeof (struct vms_section_data_struct);
   section->used_by_bfd = bfd_zalloc (abfd, amt);
@@ -9228,7 +9204,6 @@ static bfd_boolean
 vms_bfd_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
                             const char *name)
 {
-  vms_debug2 ((1, "vms_bfd_is_local_label_name (%p, %s)\n", abfd, name));
   return name[0] == '$';
 }
 \f
@@ -9316,12 +9291,16 @@ bfd_vms_get_data (bfd *abfd)
    ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 #define alpha_vms_print_symbol             vms_print_symbol
 #define alpha_vms_get_symbol_info          vms_get_symbol_info
+#define alpha_vms_get_symbol_version_string \
+  _bfd_nosymbols_get_symbol_version_string
+
 #define alpha_vms_read_minisymbols         _bfd_generic_read_minisymbols
 #define alpha_vms_minisymbol_to_symbol     _bfd_generic_minisymbol_to_symbol
 #define alpha_vms_get_lineno               _bfd_nosymbols_get_lineno
 #define alpha_vms_find_inliner_info        _bfd_nosymbols_find_inliner_info
 #define alpha_vms_bfd_make_debug_symbol    _bfd_nosymbols_bfd_make_debug_symbol
-#define alpha_vms_find_nearest_line        _bfd_vms_find_nearest_dst_line
+#define alpha_vms_find_nearest_line        _bfd_vms_find_nearest_line
+#define alpha_vms_find_line                _bfd_nosymbols_find_line
 #define alpha_vms_bfd_is_local_label_name  vms_bfd_is_local_label_name
 
 /* Generic table.  */
@@ -9344,7 +9323,6 @@ bfd_vms_get_data (bfd *abfd)
   _bfd_generic_section_already_linked
 
 #define alpha_vms_bfd_define_common_symbol bfd_generic_define_common_symbol
-#define alpha_vms_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define alpha_vms_bfd_link_just_syms _bfd_generic_link_just_syms
 #define alpha_vms_bfd_copy_link_hash_symbol_type \
   _bfd_generic_copy_link_hash_symbol_type
@@ -9359,8 +9337,9 @@ bfd_vms_get_data (bfd *abfd)
   _bfd_nodynamic_get_dynamic_reloc_upper_bound
 #define alpha_vms_canonicalize_dynamic_reloc \
   _bfd_nodynamic_canonicalize_dynamic_reloc
+#define alpha_vms_bfd_link_check_relocs              _bfd_generic_link_check_relocs
 
-const bfd_target vms_alpha_vec =
+const bfd_target alpha_vms_vec =
 {
   "vms-alpha",                 /* Name.  */
   bfd_target_evax_flavour,
This page took 0.045918 seconds and 4 git commands to generate.