Errors: report containing archive with file name

Alan Modra amodra@bigpond.net.au
Thu Sep 20 16:21:00 GMT 2001


I think it was H.J. who started improving error messages for files within
an archive, and I reckon it's a good idea.  This patch continues the theme,
but introduces a new bfd function to create "archive(file)" strings rather
than calling _bfd_error_handler twice.

bfd/ChangeLog
	* bfd.c (bfd_archive_filename): New function.
	* bfd-in2.h: Regenerate.
	* aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
	in error messages where the bfd is an input bfd.
	* aout-cris.c: Likewise.
	* coff-arm.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff-sh.c: Likewise.
	* coff-tic54x.c: Likewise.
	* coff-tic80.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* coffcode.h: Likewise.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
	* ecofflink.c: Likewise.
	* elf-hppa.h: Likewise.
	* elf.c: Likewise.
	* elf32-arm.h: Likewise.
	* elf32-cris.c: Likewise.
	* elf32-gen.c: Likewise.
	* elf32-hppa.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i386.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-mips.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-sparc.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-gen.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elflink.h: Likewise.
	* elfxx-ia64.c: Likewise.
	* ieee.c: Likewise.
	* ihex.c: Likewise.
	* libbfd.c: Likewise.
	* pdp11.c: Likewise.
	* pe-mips.c: Likewise.
	* peicode.h: Likewise.
	* srec.c: Likewise.
	* xcofflink.c: Likewise.

	* elf32-arm.h: Make _bfd_error_handler calls K&R compatible.

	* elflink.c (_bfd_elf_create_linker_section): Better grammar for
	error message.

	* coff-mcore.c (coff_mcore_relocate_section): Internalionalise
	error message.

	* elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
	Consolidate error messages, and split long messages to two lines.

-- 
Alan Modra

Index: bfd/aout-adobe.c
===================================================================
RCS file: /cvs/src/src/bfd/aout-adobe.c,v
retrieving revision 1.10
diff -u -p -r1.10 aout-adobe.c
--- aout-adobe.c	2001/09/18 09:57:21	1.10
+++ aout-adobe.c	2001/09/20 16:54:38
@@ -194,7 +194,7 @@ aout_adobe_callback (abfd)
 	default:
 	  (*_bfd_error_handler)
 	    (_("%s: Unknown section type in a.out.adobe file: %x\n"),
-	     bfd_get_filename (abfd), ext->e_type[0]);
+	     bfd_archive_filename (abfd), ext->e_type[0]);
 	  goto no_more_sections;
 	}
 
Index: bfd/aout-cris.c
===================================================================
RCS file: /cvs/src/src/bfd/aout-cris.c,v
retrieving revision 1.6
diff -u -p -r1.6 aout-cris.c
--- aout-cris.c	2001/09/18 09:57:21	1.6
+++ aout-cris.c	2001/09/20 16:54:38
@@ -249,7 +249,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cach
   if (r_type > 2)
     {
       (*_bfd_error_handler) (_("%s: Invalid relocation type imported: %d"),
-			     bfd_get_filename (abfd), r_type);
+			     bfd_archive_filename (abfd), r_type);
 
       bfd_set_error(bfd_error_wrong_format);
     }
@@ -260,7 +260,7 @@ MY(swap_ext_reloc_in) (abfd, bytes, cach
     {
       (*_bfd_error_handler)
         (_("%s: Bad relocation record imported: %d"),
-         bfd_get_filename (abfd), r_index);
+         bfd_archive_filename (abfd), r_index);
 
       bfd_set_error (bfd_error_wrong_format);
 
Index: bfd/bfd-in2.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in2.h,v
retrieving revision 1.116
diff -u -p -r1.116 bfd-in2.h
--- bfd-in2.h	2001/09/18 09:57:21	1.116
+++ bfd-in2.h	2001/09/20 16:54:46
@@ -3262,6 +3262,9 @@ bfd_set_error_program_name PARAMS ((cons
 bfd_error_handler_type
 bfd_get_error_handler PARAMS ((void));
 
+const char *
+bfd_archive_filename PARAMS ((bfd *));
+
 long
 bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
 
Index: bfd/bfd.c
===================================================================
RCS file: /cvs/src/src/bfd/bfd.c,v
retrieving revision 1.23
diff -u -p -r1.23 bfd.c
--- bfd.c	2001/09/19 05:33:12	1.23
+++ bfd.c	2001/09/20 16:54:47
@@ -529,6 +529,54 @@ bfd_get_error_handler ()
 {
   return _bfd_error_handler;
 }
+
+/*
+FUNCTION
+	bfd_archive_filename
+
+SYNOPSIS
+	const char *bfd_archive_filename (bfd *);
+
+DESCRIPTION
+	For a BFD that is a component of an archive, returns a string
+	with both the archive name and file name.  For other BFDs, just
+	returns the file name.
+*/
+
+const char *
+bfd_archive_filename (abfd)
+     bfd *abfd;
+{
+  if (abfd->my_archive)
+    {
+      static size_t curr = 0;
+      static char *buf;
+      size_t needed;
+
+      needed = (strlen (bfd_get_filename (abfd->my_archive))
+		+ strlen (bfd_get_filename (abfd)) + 3);
+      if (needed > curr)
+	{
+	  if (curr)
+	    free (buf);
+	  curr = needed + (needed >> 1);
+	  buf = bfd_malloc (curr);
+	  /* If we can't malloc, fail safe by returning just the file
+	     name. This function is only used when building error
+	     messages.  */
+	  if (!buf)
+	    {
+	      curr = 0;
+	      return bfd_get_filename (abfd);
+	    }
+	}
+      sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
+	       bfd_get_filename (abfd));
+      return buf;
+    }
+  else
+    return bfd_get_filename (abfd);
+}
 
 /*
 SECTION
Index: bfd/coff-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-arm.c,v
retrieving revision 1.30
diff -u -p -r1.30 coff-arm.c
--- coff-arm.c	2001/09/18 09:57:21	1.30
+++ coff-arm.c	2001/09/20 16:54:49
@@ -1049,7 +1049,7 @@ find_thumb_glue (info, name, input_bfd)
   if (myh == NULL)
     /* xgettext:c-format */
     _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
-			bfd_get_filename (input_bfd), tmp_name, name);
+			bfd_archive_filename (input_bfd), tmp_name, name);
 
   free (tmp_name);
 
@@ -1078,7 +1078,7 @@ find_arm_glue (info, name, input_bfd)
   if (myh == NULL)
     /* xgettext:c-format */
     _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
-			bfd_get_filename (input_bfd), tmp_name, name);
+			bfd_archive_filename (input_bfd), tmp_name, name);
 
   free (tmp_name);
 
@@ -1373,11 +1373,11 @@ coff_arm_relocate_section (output_bfd, i
 			      _bfd_error_handler
 				/* xgettext:c-format */
 				(_("%s(%s): warning: interworking not enabled."),
-				 bfd_get_filename (h_sec->owner), name);
+				 bfd_archive_filename (h_sec->owner), name);
 			      _bfd_error_handler
 				/* xgettext:c-format */
 				(_("  first occurrence: %s: arm call to thumb"),
-				 bfd_get_filename (input_bfd));
+				 bfd_archive_filename (input_bfd));
 			    }
 
 			  --my_offset;
@@ -1468,11 +1468,11 @@ coff_arm_relocate_section (output_bfd, i
 			      _bfd_error_handler
 				/* xgettext:c-format */
 				(_("%s(%s): warning: interworking not enabled."),
-				 bfd_get_filename (h_sec->owner), name);
+				 bfd_archive_filename (h_sec->owner), name);
 			      _bfd_error_handler
 				/* xgettext:c-format */
 				(_("  first occurrence: %s: thumb call to arm"),
-				 bfd_get_filename (input_bfd));
+				 bfd_archive_filename (input_bfd));
 			      _bfd_error_handler
 				(_("  consider relinking with --support-old-code enabled"));
 			    }
@@ -1765,7 +1765,7 @@ coff_arm_relocate_section (output_bfd, i
 	case bfd_reloc_outofrange:
 	  (*_bfd_error_handler)
 	    (_("%s: bad reloc address 0x%lx in section `%s'"),
-	     bfd_get_filename (input_bfd),
+	     bfd_archive_filename (input_bfd),
 	     (unsigned long) rel->r_vaddr,
 	     bfd_get_section_name (input_bfd, input_section));
 	  return false;
@@ -2105,7 +2105,7 @@ bfd_arm_process_before_allocation (abfd,
 	  if (symndx >= obj_conv_table_size (abfd))
 	    {
 	      _bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
-				  bfd_get_filename (abfd), symndx);
+				  bfd_archive_filename (abfd), symndx);
 	      continue;
 	    }
 
@@ -2233,7 +2233,7 @@ coff_arm_merge_private_bfd_data (ibfd, o
 	      _bfd_error_handler
 		/* xgettext: c-format */
 		(_("%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"),
-		 bfd_get_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
+		 bfd_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
 		 bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
 		 );
 
@@ -2252,7 +2252,7 @@ coff_arm_merge_private_bfd_data (ibfd, o
 		/* xgettext: c-format */
 		msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers");
 
-	      _bfd_error_handler (msg, bfd_get_filename (ibfd),
+	      _bfd_error_handler (msg, bfd_archive_filename (ibfd),
 				  bfd_get_filename (obfd));
 
 	      bfd_set_error (bfd_error_wrong_format);
@@ -2269,7 +2269,7 @@ coff_arm_merge_private_bfd_data (ibfd, o
 	      else
 		/* xgettext: c-format */
 		msg = _("%s: ERROR: compiled as absolute position code, whereas target %s is position independent");
-	      _bfd_error_handler (msg, bfd_get_filename (ibfd),
+	      _bfd_error_handler (msg, bfd_archive_filename (ibfd),
 				  bfd_get_filename (obfd));
 
 	      bfd_set_error (bfd_error_wrong_format);
@@ -2302,7 +2302,7 @@ coff_arm_merge_private_bfd_data (ibfd, o
 		/* xgettext: c-format */
 		msg = _("Warning: input file %s does not support interworking, whereas %s does.");
 
-	      _bfd_error_handler (msg, bfd_get_filename (ibfd),
+	      _bfd_error_handler (msg, bfd_archive_filename (ibfd),
 				  bfd_get_filename (obfd));
 	    }
 	}
@@ -2399,11 +2399,11 @@ _bfd_coff_arm_set_private_flags (abfd, f
       if (flag)
 	/* xgettext: c-format */
 	_bfd_error_handler (_("Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"),
-			    bfd_get_filename (abfd));
+			    bfd_archive_filename (abfd));
       else
 	/* xgettext: c-format */
 	_bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
-			    bfd_get_filename (abfd));
+			    bfd_archive_filename (abfd));
       flag = 0;
     }
 
@@ -2463,7 +2463,7 @@ coff_arm_copy_private_bfd_data (src, des
 		  /* xgettext:c-format */
 		  _bfd_error_handler (("Warning: Clearing the interworking bit of %s, because the non-interworking code in %s has been copied into it"),
 				      bfd_get_filename (dest),
-				      bfd_get_filename (src));
+				      bfd_archive_filename (src));
 		}
 
 	      SET_INTERWORK_FLAG (dest, 0);
Index: bfd/coff-mcore.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-mcore.c,v
retrieving revision 1.21
diff -u -p -r1.21 coff-mcore.c
--- coff-mcore.c	2001/09/18 09:57:22	1.21
+++ coff-mcore.c	2001/09/20 16:54:49
@@ -282,7 +282,7 @@ mcore_coff_unsupported_reloc (abfd, relo
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
 
   _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
-		      bfd_get_filename (abfd),
+		      bfd_archive_filename (abfd),
 		      reloc_entry->howto->name,
 		      reloc_entry->howto->type);
 
@@ -396,10 +396,10 @@ coff_mcore_relocate_section (output_bfd,
       && output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
     {
       (*_bfd_error_handler)
-	(_("%s: compiled for a %s endian system and target is %s endian.\n"),
-	 bfd_get_filename (input_bfd),
-         bfd_big_endian (input_bfd) ? "big" : "little",
-         bfd_big_endian (output_bfd) ? "big" : "little");
+	(_("%s: compiled for a %s system and target is %s.\n"),
+	 bfd_archive_filename (input_bfd),
+         bfd_big_endian (input_bfd) ? _("big endian") : _("little endian"),
+         bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
 
       bfd_set_error (bfd_error_wrong_format);
       return false;
@@ -504,7 +504,7 @@ coff_mcore_relocate_section (output_bfd,
 	{
 	default:
 	  _bfd_error_handler (_("%s: unsupported relocation type 0x%02x"),
-			      bfd_get_filename (input_bfd), r_type);
+			      bfd_archive_filename (input_bfd), r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 
@@ -512,7 +512,7 @@ coff_mcore_relocate_section (output_bfd,
 	  fprintf (stderr,
 		   _("Warning: unsupported reloc %s <file %s, section %s>\n"),
 		   howto->name,
-		   bfd_get_filename (input_bfd),
+		   bfd_archive_filename (input_bfd),
 		   input_section->name);
 
 	  fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
Index: bfd/coff-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-ppc.c,v
retrieving revision 1.12
diff -u -p -r1.12 coff-ppc.c
--- coff-ppc.c	2001/09/18 09:57:22	1.12
+++ coff-ppc.c	2001/09/20 16:54:52
@@ -1195,7 +1195,7 @@ coff_ppc_relocate_section (output_bfd, i
 	default:
 	  (*_bfd_error_handler)
 	    (_("%s: unsupported relocation type 0x%02x"),
-	     bfd_get_filename (input_bfd), r_type);
+	     bfd_archive_filename (input_bfd), r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	case IMAGE_REL_PPC_TOCREL16:
@@ -1288,7 +1288,7 @@ coff_ppc_relocate_section (output_bfd, i
 		      {
 			(*_bfd_error_handler)
 			  (_("%s: Relocation for %s of %lx exceeds Toc size limit"),
-			   bfd_get_filename (input_bfd), name,
+			   bfd_archive_filename (input_bfd), name,
 			   (unsigned long) our_toc_offset);
 			bfd_set_error (bfd_error_bad_value);
 			return false;
@@ -1345,7 +1345,7 @@ coff_ppc_relocate_section (output_bfd, i
 	      {
 		(*_bfd_error_handler)
 		  (_("%s: Relocation exceeds allocated TOC (%lx)"),
-		   bfd_get_filename (input_bfd),
+		   bfd_archive_filename (input_bfd),
 		   (unsigned long) toc_section->_raw_size);
 		bfd_set_error (bfd_error_bad_value);
 		return false;
@@ -1402,7 +1402,7 @@ coff_ppc_relocate_section (output_bfd, i
 	    fprintf (stderr,
 		    _("Warning: unsupported reloc %s <file %s, section %s>\n"),
 		    howto->name,
-		    bfd_get_filename(input_bfd),
+		    bfd_archive_filename(input_bfd),
 		    input_section->name);
 
 	    fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
@@ -1421,7 +1421,7 @@ coff_ppc_relocate_section (output_bfd, i
 
 	    (*_bfd_error_handler)
 	      (_("%s: Out of order IMGLUE reloc for %s"),
-	       bfd_get_filename (input_bfd), my_name);
+	       bfd_archive_filename (input_bfd), my_name);
 	    bfd_set_error (bfd_error_bad_value);
 	    return false;
 	  }
Index: bfd/coff-rs6000.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-rs6000.c,v
retrieving revision 1.25
diff -u -p -r1.25 coff-rs6000.c
--- coff-rs6000.c	2001/09/18 09:57:22	1.25
+++ coff-rs6000.c	2001/09/20 16:54:54
@@ -2576,7 +2576,7 @@ xcoff_ppc_relocate_section (output_bfd, 
 	default:
 	  (*_bfd_error_handler)
 	    (_("%s: unsupported relocation type 0x%02x"),
-	     bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
+	     bfd_archive_filename (input_bfd), (unsigned int) rel->r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	case R_POS:
@@ -2622,7 +2622,7 @@ xcoff_ppc_relocate_section (output_bfd, 
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
-		     bfd_get_filename (input_bfd), rel->r_vaddr,
+		     bfd_archive_filename (input_bfd), rel->r_vaddr,
 		     h->root.root.string);
 		  bfd_set_error (bfd_error_bad_value);
 		  return false;
@@ -2872,7 +2872,7 @@ xcoff_create_csect_from_smclas (abfd, au
     {
       (*_bfd_error_handler)
 	(_("%s: symbol `%s' has unrecognized smclas %d"),
-	 bfd_get_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+	 bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
       bfd_set_error (bfd_error_bad_value);
     }
 
Index: bfd/coff-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-sh.c,v
retrieving revision 1.18
diff -u -p -r1.18 coff-sh.c
--- coff-sh.c	2001/09/18 09:57:22	1.18
+++ coff-sh.c	2001/09/20 16:54:56
@@ -761,7 +761,7 @@ sh_relax_section (abfd, sec, link_info, 
       if (laddr >= sec->_raw_size)
 	{
 	  (*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
-				 bfd_get_filename (abfd),
+				 bfd_archive_filename (abfd),
 				 (unsigned long) irel->r_vaddr);
 	  continue;
 	}
@@ -772,7 +772,7 @@ sh_relax_section (abfd, sec, link_info, 
 	{
 	  ((*_bfd_error_handler)
 	   ("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
-	    bfd_get_filename (abfd), (unsigned long) irel->r_vaddr, insn));
+	    bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr, insn));
 	  continue;
 	}
 
@@ -789,7 +789,7 @@ sh_relax_section (abfd, sec, link_info, 
 	{
 	  ((*_bfd_error_handler)
 	   ("%s: 0x%lx: warning: bad R_SH_USES load offset",
-	    bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+	    bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
 	  continue;
 	}
 
@@ -812,7 +812,7 @@ sh_relax_section (abfd, sec, link_info, 
 	{
 	  ((*_bfd_error_handler)
 	   ("%s: 0x%lx: warning: could not find expected reloc",
-	    bfd_get_filename (abfd), (unsigned long) paddr));
+	    bfd_archive_filename (abfd), (unsigned long) paddr));
 	  continue;
 	}
 
@@ -828,7 +828,7 @@ sh_relax_section (abfd, sec, link_info, 
 	{
 	  ((*_bfd_error_handler)
 	   ("%s: 0x%lx: warning: symbol in unexpected section",
-	    bfd_get_filename (abfd), (unsigned long) paddr));
+	    bfd_archive_filename (abfd), (unsigned long) paddr));
 	  continue;
 	}
 
@@ -963,7 +963,7 @@ sh_relax_section (abfd, sec, link_info, 
 	{
 	  ((*_bfd_error_handler)
 	   ("%s: 0x%lx: warning: could not find expected COUNT reloc",
-	    bfd_get_filename (abfd), (unsigned long) paddr));
+	    bfd_archive_filename (abfd), (unsigned long) paddr));
 	  continue;
 	}
 
@@ -972,7 +972,7 @@ sh_relax_section (abfd, sec, link_info, 
       if (irelcount->r_offset == 0)
 	{
 	  ((*_bfd_error_handler) ("%s: 0x%lx: warning: bad count",
-				  bfd_get_filename (abfd),
+				  bfd_archive_filename (abfd),
 				  (unsigned long) paddr));
 	  continue;
 	}
@@ -1368,7 +1368,7 @@ sh_relax_delete_bytes (abfd, sec, addr, 
 	    {
 	      ((*_bfd_error_handler)
 	       ("%s: 0x%lx: fatal: reloc overflow while relaxing",
-		bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+		bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -1468,7 +1468,7 @@ sh_relax_delete_bytes (abfd, sec, addr, 
     {
       ((*_bfd_error_handler)
        ("%s: fatal: generic symbols retrieved before relaxing",
-	bfd_get_filename (abfd)));
+	bfd_archive_filename (abfd)));
       bfd_set_error (bfd_error_invalid_operation);
       return false;
     }
@@ -2827,7 +2827,7 @@ sh_swap_insns (abfd, sec, relocs, conten
 	    {
 	      ((*_bfd_error_handler)
 	       ("%s: 0x%lx: fatal: reloc overflow while relaxing",
-		bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+		bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -2891,7 +2891,7 @@ sh_relocate_section (output_bfd, info, i
 	    {
 	      (*_bfd_error_handler)
 		("%s: illegal symbol index %ld in relocs",
-		 bfd_get_filename (input_bfd), symndx);
+		 bfd_archive_filename (input_bfd), symndx);
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
Index: bfd/coff-tic54x.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic54x.c,v
retrieving revision 1.10
diff -u -p -r1.10 coff-tic54x.c
--- coff-tic54x.c	2001/09/18 09:57:22	1.10
+++ coff-tic54x.c	2001/09/20 16:54:56
@@ -388,7 +388,7 @@ tic54x_reloc_processing (relent, reloc, 
         {
           (*_bfd_error_handler)
             (_("%s: warning: illegal symbol index %ld in relocs"),
-             bfd_get_filename (abfd), reloc->r_symndx);
+             bfd_archive_filename (abfd), reloc->r_symndx);
           relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
           ptr = NULL;
         }
Index: bfd/coff-tic80.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-tic80.c,v
retrieving revision 1.8
diff -u -p -r1.8 coff-tic80.c
--- coff-tic80.c	2001/09/18 09:57:22	1.8
+++ coff-tic80.c	2001/09/20 16:54:56
@@ -684,7 +684,7 @@ coff_tic80_relocate_section (output_bfd,
 	case bfd_reloc_outofrange:
 	  (*_bfd_error_handler)
 	    (_("%s: bad reloc address 0x%lx in section `%s'"),
-	     bfd_get_filename (input_bfd),
+	     bfd_archive_filename (input_bfd),
 	     (unsigned long) rel->r_vaddr,
 	     bfd_get_section_name (input_bfd, input_section));
 	  return false;
Index: bfd/coff64-rs6000.c
===================================================================
RCS file: /cvs/src/src/bfd/coff64-rs6000.c,v
retrieving revision 1.12
diff -u -p -r1.12 coff64-rs6000.c
--- coff64-rs6000.c	2001/09/18 09:57:22	1.12
+++ coff64-rs6000.c	2001/09/20 16:54:58
@@ -1159,7 +1159,7 @@ xcoff64_ppc_relocate_section (output_bfd
 	default:
 	  (*_bfd_error_handler)
 	    (_("%s: unsupported relocation type 0x%02x"),
-	     bfd_get_filename (input_bfd), (unsigned int) rel->r_type);
+	     bfd_archive_filename (input_bfd), (unsigned int) rel->r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	case R_POS:
@@ -1205,7 +1205,7 @@ xcoff64_ppc_relocate_section (output_bfd
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
-		     bfd_get_filename (input_bfd), rel->r_vaddr,
+		     bfd_archive_filename (input_bfd), rel->r_vaddr,
 		     h->root.root.string);
 		  bfd_set_error (bfd_error_bad_value);
 		  return false;
@@ -2055,7 +2055,7 @@ xcoff64_create_csect_from_smclas (abfd, 
     {
       (*_bfd_error_handler)
 	(_("%s: symbol `%s' has unrecognized smclas %d"),
-	 bfd_get_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+	 bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
       bfd_set_error (bfd_error_bad_value);
     }
 
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.61
diff -u -p -r1.61 coffcode.h
--- coffcode.h	2001/09/18 09:57:22	1.61
+++ coffcode.h	2001/09/20 16:55:03
@@ -1071,7 +1071,7 @@ styp_to_sec_flags (abfd, hdr, name, sect
 	{
 	  (*_bfd_error_handler)
 	    (_("%s (%s): Section flag %s (0x%x) ignored"),
-	     bfd_get_filename (abfd), name, unhandled, flag);
+	     bfd_archive_filename (abfd), name, unhandled, flag);
 	  result = false;
 	}
     }
@@ -4194,7 +4194,7 @@ coff_slurp_line_table (abfd, asect)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: illegal symbol index %ld in line numbers"),
-		     bfd_get_filename (abfd), dst.l_addr.l_symndx);
+		     bfd_archive_filename (abfd), dst.l_addr.l_symndx);
 		  symndx = 0;
 		  warned = true;
 		}
@@ -4208,7 +4208,7 @@ coff_slurp_line_table (abfd, asect)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: duplicate line number information for `%s'"),
-		     bfd_get_filename (abfd),
+		     bfd_archive_filename (abfd),
 		     bfd_asymbol_name (&sym->symbol));
 		}
 	      sym->lineno = cache_ptr;
@@ -4567,7 +4567,7 @@ coff_slurp_symbol_table (abfd)
 	    default:
 	      (*_bfd_error_handler)
 		(_("%s: Unrecognized storage class %d for %s symbol `%s'"),
-		 bfd_get_filename (abfd), src->u.syment.n_sclass,
+		 bfd_archive_filename (abfd), src->u.syment.n_sclass,
 		 dst->symbol.section->name, dst->symbol.name);
 	      dst->symbol.flags = BSF_DEBUGGING;
 	      dst->symbol.value = (src->u.syment.n_value);
@@ -4698,7 +4698,7 @@ coff_classify_symbol (abfd, syment)
 
       (*_bfd_error_handler)
 	(_("warning: %s: local symbol `%s' has no section"),
-	 bfd_get_filename (abfd),
+	 bfd_archive_filename (abfd),
 	 _bfd_coff_internal_syment_name (abfd, syment, buf));
     }
 
@@ -4805,7 +4805,7 @@ coff_slurp_reloc_table (abfd, asect, sym
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: warning: illegal symbol index %ld in relocs"),
-		 bfd_get_filename (abfd), dst.r_symndx);
+		 bfd_archive_filename (abfd), dst.r_symndx);
 	      cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
 	      ptr = NULL;
 	    }
@@ -4843,7 +4843,7 @@ coff_slurp_reloc_table (abfd, asect, sym
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: illegal relocation type %d at address 0x%lx"),
-	     bfd_get_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+	     bfd_archive_filename (abfd), dst.r_type, (long) dst.r_vaddr);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	}
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.25
diff -u -p -r1.25 coffgen.c
--- coffgen.c	2001/09/18 09:57:22	1.25
+++ coffgen.c	2001/09/20 16:55:04
@@ -1645,7 +1645,7 @@ _bfd_coff_read_string_table (abfd)
   if (strsize < STRING_SIZE_SIZE)
     {
       (*_bfd_error_handler)
-	(_("%s: bad string table size %lu"), bfd_get_filename (abfd),
+	(_("%s: bad string table size %lu"), bfd_archive_filename (abfd),
 	 (unsigned long) strsize);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
Index: bfd/cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.27
diff -u -p -r1.27 cofflink.c
--- cofflink.c	2001/09/18 09:57:22	1.27
+++ cofflink.c	2001/09/20 16:55:07
@@ -535,7 +535,7 @@ coff_link_add_symbols (abfd, info)
   			(*_bfd_error_handler)
   			  (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
   			   name, (*sym_hash)->type, sym.n_type,
-  			   bfd_get_filename (abfd));
+  			   bfd_archive_filename (abfd));
 
   		      /* We don't want to change from a meaningful
   			 base type to a null one, but if we know
@@ -2317,7 +2317,7 @@ _bfd_coff_link_input_bfd (finfo, input_b
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: relocs in section `%s', but it has no contents"),
-		bfd_get_filename (input_bfd),
+		bfd_archive_filename (input_bfd),
 		bfd_get_section_name (input_bfd, o)));
 	      bfd_set_error (bfd_error_no_contents);
 	      return false;
@@ -2895,7 +2895,7 @@ _bfd_coff_generic_relocate_section (outp
 	{
 	  (*_bfd_error_handler)
 	    ("%s: illegal symbol index %ld in relocs",
-	     bfd_get_filename (input_bfd), symndx);
+	     bfd_archive_filename (input_bfd), symndx);
 	  return false;
 	}
       else
@@ -3017,7 +3017,7 @@ _bfd_coff_generic_relocate_section (outp
 	case bfd_reloc_outofrange:
 	  (*_bfd_error_handler)
 	    (_("%s: bad reloc address 0x%lx in section `%s'"),
-	     bfd_get_filename (input_bfd),
+	     bfd_archive_filename (input_bfd),
 	     (unsigned long) rel->r_vaddr,
 	     bfd_get_section_name (input_bfd, input_section));
 	  return false;
Index: bfd/ecofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/ecofflink.c,v
retrieving revision 1.5
diff -u -p -r1.5 ecofflink.c
--- ecofflink.c	2001/09/18 09:57:23	1.5
+++ ecofflink.c	2001/09/20 16:55:08
@@ -1201,7 +1201,7 @@ bfd_ecoff_debug_accumulate_other (handle
   fdr.issBase = output_symhdr->issMax;
   fdr.cbSs = 0;
   fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
-			      bfd_get_filename (input_bfd));
+			      bfd_archive_filename (input_bfd));
   if (fdr.rss == -1)
     return false;
   fdr.isymBase = output_symhdr->isymMax;
Index: bfd/elf-hppa.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-hppa.h,v
retrieving revision 1.50
diff -u -p -r1.50 elf-hppa.h
--- elf-hppa.h	2001/09/18 09:57:23	1.50
+++ elf-hppa.h	2001/09/20 16:55:12
@@ -1367,7 +1367,7 @@ elf_hppa_relocate_section (output_bfd, i
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
@@ -1400,7 +1400,7 @@ elf_hppa_relocate_section (output_bfd, i
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.92
diff -u -p -r1.92 elf.c
--- elf.c	2001/09/18 09:57:23	1.92
+++ elf.c	2001/09/20 16:55:16
@@ -334,7 +334,7 @@ bfd_elf_string_from_elf_section (abfd, s
     {
       (*_bfd_error_handler)
 	(_("%s: invalid string offset %u >= %lu for section `%s'"),
-	 bfd_get_filename (abfd), strindex, (unsigned long) hdr->sh_size,
+	 bfd_archive_filename (abfd), strindex, (unsigned long) hdr->sh_size,
 	 ((shindex == elf_elfheader(abfd)->e_shstrndx
 	   && strindex == hdr->sh_name)
 	  ? ".shstrtab"
@@ -1398,7 +1398,7 @@ bfd_section_from_shdr (abfd, shindex)
 	  {
 	    ((*_bfd_error_handler)
 	     (_("%s: invalid link %lu for reloc section %s (index %u)"),
-	      bfd_get_filename (abfd), hdr->sh_link, name, shindex));
+	      bfd_archive_filename (abfd), hdr->sh_link, name, shindex));
 	    return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
 	  }
 
@@ -3595,7 +3595,7 @@ _bfd_elf_symbol_from_bfd_symbol (abfd, a
          which is used in a relocation entry.  */
       (*_bfd_error_handler)
 	(_("%s: symbol `%s' required but not present"),
-	 bfd_get_filename (abfd), bfd_asymbol_name (asym_ptr));
+	 bfd_archive_filename (abfd), bfd_asymbol_name (asym_ptr));
       bfd_set_error (bfd_error_no_symbols);
       return -1;
     }
@@ -3845,7 +3845,7 @@ copy_private_bfd_data (ibfd, obfd)
 	  if (segment->p_type == PT_LOAD)
 	      _bfd_error_handler
 		(_("%s: warning: Empty loadable segment detected\n"),
-		 bfd_get_filename (ibfd));
+		 bfd_archive_filename (ibfd));
 
 	  map->count = 0;
 	  *pointer_to_map = map;
@@ -5227,7 +5227,7 @@ _bfd_elf_validate_reloc (abfd, areloc)
  fail:
   (*_bfd_error_handler)
     (_("%s: unsupported relocation type %s"),
-     bfd_get_filename (abfd), areloc->howto->name);
+     bfd_archive_filename (abfd), areloc->howto->name);
   bfd_set_error (bfd_error_bad_value);
   return false;
 }
Index: bfd/elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.57
diff -u -p -r1.57 elf32-arm.h
--- elf32-arm.h	2001/09/18 09:57:23	1.57
+++ elf32-arm.h	2001/09/20 16:55:21
@@ -282,8 +282,8 @@ find_thumb_glue (link_info, name, input_
 
   if (hash == NULL)
     /* xgettext:c-format */
-    _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
-			bfd_get_filename (input_bfd), tmp_name, name);
+    (*_bfd_error_handler) (_("%s: unable to find THUMB glue '%s' for `%s'"),
+			   bfd_archive_filename (input_bfd), tmp_name, name);
 
   free (tmp_name);
 
@@ -317,8 +317,8 @@ find_arm_glue (link_info, name, input_bf
 
   if (myh == NULL)
     /* xgettext:c-format */
-    _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
-			bfd_get_filename (input_bfd), tmp_name, name);
+    (*_bfd_error_handler) (_("%s: unable to find ARM glue '%s' for `%s'"),
+			   bfd_archive_filename (input_bfd), tmp_name, name);
 
   free (tmp_name);
 
@@ -882,12 +882,12 @@ elf32_thumb_to_arm_stub (info, name, inp
 	  && sym_sec->owner != NULL
 	  && !INTERWORK_FLAG (sym_sec->owner))
 	{
-	  _bfd_error_handler
+	  (*_bfd_error_handler)
 	    (_("%s(%s): warning: interworking not enabled."),
-	     bfd_get_filename (sym_sec->owner), name);
-	  _bfd_error_handler
+	     bfd_archive_filename (sym_sec->owner), name);
+	  (*_bfd_error_handler)
 	    (_("  first occurrence: %s: thumb call to arm"),
-	     bfd_get_filename (input_bfd));
+	     bfd_archive_filename (input_bfd));
 
 	  return false;
 	}
@@ -986,12 +986,12 @@ elf32_arm_to_thumb_stub (info, name, inp
 	  && sym_sec->owner != NULL
 	  && !INTERWORK_FLAG (sym_sec->owner))
 	{
-	  _bfd_error_handler
+	  (*_bfd_error_handler)
 	    (_("%s(%s): warning: interworking not enabled."),
-	     bfd_get_filename (sym_sec->owner), name);
-	  _bfd_error_handler
+	     bfd_archive_filename (sym_sec->owner), name);
+	  (*_bfd_error_handler)
 	    (_("  first occurrence: %s: arm call to thumb"),
-	     bfd_get_filename (input_bfd));
+	     bfd_archive_filename (input_bfd));
 	}
 
       --my_offset;
@@ -1231,10 +1231,10 @@ elf32_arm_final_link_relocate (howto, in
 	      /* FIXME: Should we translate the instruction into a BL
 		 instruction instead ?  */
 	      if (sym_flags != STT_ARM_TFUNC)
-		_bfd_error_handler (_("\
+		(*_bfd_error_handler) (_("\
 %s: Warning: Arm BLX instruction targets Arm function '%s'."),
-				    bfd_get_filename (input_bfd),
-				    h ? h->root.root.string : "(local)");
+				       bfd_archive_filename (input_bfd),
+				       h ? h->root.root.string : "(local)");
 	    }
 	  else
 #endif
@@ -1427,10 +1427,10 @@ elf32_arm_final_link_relocate (howto, in
 	    /* FIXME: Should we translate the instruction into a BL
 	       instruction instead ?  */
 	    if (sym_flags == STT_ARM_TFUNC)
-	      _bfd_error_handler (_("\
+	      (*_bfd_error_handler) (_("\
 %s: Warning: Thumb BLX instruction targets thumb function '%s'."),
-				  bfd_get_filename (input_bfd),
-				  h ? h->root.root.string : "(local)");
+				     bfd_archive_filename (input_bfd),
+				     h ? h->root.root.string : "(local)");
 	  }
 	else
 #endif
@@ -1924,7 +1924,7 @@ elf32_arm_relocate_section (output_bfd, 
 		    {
 		      (*_bfd_error_handler)
 			(_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-			 bfd_get_filename (input_bfd), h->root.root.string,
+			 bfd_archive_filename (input_bfd), h->root.root.string,
 			 bfd_get_section_name (input_bfd, input_section));
 		      relocation_needed = 0;
 		    }
@@ -2037,13 +2037,13 @@ elf32_arm_set_private_flags (abfd, flags
       if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
 	{
 	  if (flags & EF_ARM_INTERWORK)
-	    _bfd_error_handler (_("\
+	    (*_bfd_error_handler) (_("\
 Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"),
-				bfd_get_filename (abfd));
+				   bfd_archive_filename (abfd));
 	  else
-	    _bfd_error_handler (_("\
+	    (*_bfd_error_handler) (_("\
 Warning: Clearing the interwork flag of %s due to outside request"),
-				bfd_get_filename (abfd));
+				   bfd_archive_filename (abfd));
 	}
     }
   else
@@ -2089,9 +2089,12 @@ elf32_arm_copy_private_bfd_data (ibfd, o
       if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
 	{
 	  if (out_flags & EF_ARM_INTERWORK)
-	    _bfd_error_handler (_("\
+	    {
+	      (*_bfd_error_handler) (_("\
 Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"),
-			  bfd_get_filename (obfd), bfd_get_filename (ibfd));
+				     bfd_get_filename (obfd),
+				     bfd_archive_filename (ibfd));
+	    }
 
 	  in_flags &= ~EF_ARM_INTERWORK;
 	}
@@ -2183,12 +2186,12 @@ elf32_arm_merge_private_bfd_data (ibfd, 
   /* Complain about various flag mismatches.  */
   if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
     {
-      _bfd_error_handler (_("\
+      (*_bfd_error_handler) (_("\
 Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
-			 bfd_get_filename (ibfd),
-			 (in_flags & EF_ARM_EABIMASK) >> 24,
-			 bfd_get_filename (obfd),
-			 (out_flags & EF_ARM_EABIMASK) >> 24);
+			     bfd_archive_filename (ibfd),
+			     (in_flags & EF_ARM_EABIMASK) >> 24,
+			     bfd_get_filename (obfd),
+			     (out_flags & EF_ARM_EABIMASK) >> 24);
       return false;
     }
 
@@ -2197,49 +2200,51 @@ Error: %s compiled for EABI version %d, 
     {
       if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
 	{
-	  _bfd_error_handler (_("\
+	  (*_bfd_error_handler) (_("\
 Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
-			bfd_get_filename (ibfd),
-			in_flags & EF_ARM_APCS_26 ? 26 : 32,
-			bfd_get_filename (obfd),
-			out_flags & EF_ARM_APCS_26 ? 26 : 32);
+				 bfd_archive_filename (ibfd),
+				 in_flags & EF_ARM_APCS_26 ? 26 : 32,
+				 bfd_get_filename (obfd),
+				 out_flags & EF_ARM_APCS_26 ? 26 : 32);
 	  flags_compatible = false;
 	}
 
       if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT))
 	{
-	  _bfd_error_handler (_("\
+	  char *s1 = in_flags & EF_ARM_APCS_FLOAT ? _("float") : _("integer");
+	  char *s2 = out_flags & EF_ARM_APCS_26 ? _("float") : _("integer");
+	  (*_bfd_error_handler) (_("\
 Error: %s passes floats in %s registers, whereas %s passes them in %s registers"),
-			bfd_get_filename (ibfd),
-		     in_flags & EF_ARM_APCS_FLOAT ? _("float") : _("integer"),
-			bfd_get_filename (obfd),
-		      out_flags & EF_ARM_APCS_26 ? _("float") : _("integer"));
+				 bfd_archive_filename (ibfd), s1,
+				 bfd_get_filename (obfd), s2);
 	  flags_compatible = false;
 	}
 
 #ifdef EF_ARM_SOFT_FLOAT
       if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT))
 	{
-	  _bfd_error_handler (_ ("\
+	  char *s1 = in_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard");
+	  char *s2 = out_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard");
+	  (*_bfd_error_handler) (_ ("\
 Error: %s uses %s floating point, whereas %s uses %s floating point"),
-			      bfd_get_filename (ibfd),
-			      in_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard"),
-			      bfd_get_filename (obfd),
-			      out_flags & EF_ARM_SOFT_FLOAT ? _("soft") : _("hard"));
+				 bfd_archive_filename (ibfd), s1,
+				 bfd_get_filename (obfd), s2);
 	  flags_compatible = false;
 	}
 #endif
 
       /* Interworking mismatch is only a warning.  */
       if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
-	_bfd_error_handler (_("\
+	{
+	  char *s1 = (in_flags & EF_ARM_INTERWORK
+		      ? _("supports") : _("does not support"));
+	  char *s2 = out_flags & EF_ARM_INTERWORK ? _("does") : _("does not");
+	  (*_bfd_error_handler) (_("\
 Warning: %s %s interworking, whereas %s %s"),
-			    bfd_get_filename (ibfd),
-			    in_flags & EF_ARM_INTERWORK ? _("supports") : _("does not support"),
-			    bfd_get_filename (obfd),
-			    out_flags & EF_ARM_INTERWORK ? _("does") : _("does not"));
+				 bfd_archive_filename (ibfd), s1,
+				 bfd_get_filename (obfd), s2);
+	}
     }
-
   return flags_compatible;
 }
 
Index: bfd/elf32-cris.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-cris.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf32-cris.c
--- elf32-cris.c	2001/09/20 10:37:34	1.10
+++ elf32-cris.c	2001/09/20 16:55:23
@@ -876,21 +876,12 @@ cris_elf_relocate_section (output_bfd, i
 			      + sec->output_offset);
 	      else
 		{
-		  if (input_bfd->my_archive)
-		    (*_bfd_error_handler)
-		      (_("%s(%s): unresolvable relocation %s against symbol `%s' from %s section"),
-		       bfd_get_filename (bfd_my_archive (input_bfd)),
-		       bfd_get_filename (input_bfd),
-		       cris_elf_howto_table[r_type].name,
-		       symname,
-		       bfd_get_section_name (input_bfd, input_section));
-		  else
-		    (*_bfd_error_handler)
-		      (_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
-		       bfd_get_filename (input_bfd),
-		       cris_elf_howto_table[r_type].name,
-		       symname,
-		       bfd_get_section_name (input_bfd, input_section));
+		  (*_bfd_error_handler)
+		    (_("%s: unresolvable relocation %s against symbol `%s' from %s section"),
+		     bfd_archive_filename (input_bfd),
+		     cris_elf_howto_table[r_type].name,
+		     symname,
+		     bfd_get_section_name (input_bfd, input_section));
 		  bfd_set_error (bfd_error_bad_value);
 		  return false;
 		}
@@ -950,7 +941,7 @@ cris_elf_relocate_section (output_bfd, i
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"),
-		 bfd_get_filename (input_bfd),
+		 bfd_archive_filename (input_bfd),
 		 cris_elf_howto_table[r_type].name,
 		 symname[0] != '\0' ? symname : _("[whose name is lost]"),
 		 bfd_get_section_name (input_bfd, input_section));
@@ -1069,14 +1060,14 @@ cris_elf_relocate_section (output_bfd, i
 		if (h == NULL)
 		  (*_bfd_error_handler)
 		    (_("%s: relocation %s with non-zero addend %d against local symbol from %s section"),
-		     bfd_get_filename (input_bfd),
+		     bfd_archive_filename (input_bfd),
 		     cris_elf_howto_table[r_type].name,
 		     rel->r_addend,
 		     bfd_get_section_name (input_bfd, input_section));
 		else
 		  (*_bfd_error_handler)
 		    (_("%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd),
+		     bfd_archive_filename (input_bfd),
 		     cris_elf_howto_table[r_type].name,
 		     rel->r_addend,
 		     symname[0] != '\0' ? symname : _("[whose name is lost]"),
@@ -1094,7 +1085,7 @@ cris_elf_relocate_section (output_bfd, i
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
-		 bfd_get_filename (input_bfd),
+		 bfd_archive_filename (input_bfd),
 		 cris_elf_howto_table[r_type].name,
 		 symname,
 		 bfd_get_section_name (input_bfd, input_section));
@@ -1212,7 +1203,7 @@ cris_elf_relocate_section (output_bfd, i
 		    {
 		      (*_bfd_error_handler)
 			(_("%s: Internal inconsistency; no relocation section %s"),
-			 bfd_get_filename (input_bfd),
+			 bfd_archive_filename (input_bfd),
 			 name);
 
 		      bfd_set_error (bfd_error_bad_value);
@@ -2470,19 +2461,11 @@ cris_elf_check_relocs (abfd, info, sec, 
 	      && (sec->flags & SEC_READONLY) != 0)
 	    {
 	      /* FIXME: How do we make this optionally a warning only?  */
-	      if (abfd->my_archive)
-		(*_bfd_error_handler)
-		  (_("%s(%s), section %s:\n  relocation %s should not be used in a shared object; recompile with -fPIC"),
-		   bfd_get_filename (bfd_my_archive (abfd)),
-		   bfd_get_filename (abfd),
-		   sec->name,
-		   cris_elf_howto_table[r_type].name);
-	      else
-		(*_bfd_error_handler)
-		  (_("%s, section %s:\n  relocation %s should not be used in a shared object; recompile with -fPIC"),
-		   bfd_get_filename (abfd),
-		   sec->name,
-		   cris_elf_howto_table[r_type].name);
+	      (*_bfd_error_handler)
+		(_("%s, section %s:\n  relocation %s should not be used in a shared object; recompile with -fPIC"),
+		 bfd_archive_filename (abfd),
+		 sec->name,
+		 cris_elf_howto_table[r_type].name);
 	    }
 	  /* Fall through.  */
 
@@ -2988,7 +2971,7 @@ cris_elf_merge_private_bfd_data (ibfd, o
 	((new_flags & EF_CRIS_UNDERSCORE)
 	 ? _("%s: uses _-prefixed symbols, but writing file with non-prefixed symbols")
 	 : _("%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
       bfd_set_error (bfd_error_bad_value);
       return false;
     }
Index: bfd/elf32-gen.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-gen.c,v
retrieving revision 1.7
diff -u -p -r1.7 elf32-gen.c
--- elf32-gen.c	2001/09/18 09:57:23	1.7
+++ elf32-gen.c	2001/09/20 16:55:23
@@ -79,15 +79,9 @@ elf32_generic_link_add_symbols (abfd, in
 	Elf_Internal_Ehdr *ehdrp;
 
 	ehdrp = elf_elfheader (abfd);
-	if (abfd->my_archive)
-	  (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
-				 bfd_get_filename (abfd->my_archive),
-				 bfd_get_filename (abfd),
-				 ehdrp->e_machine);
-	else
-	  (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
-				 bfd_get_filename (abfd),
-				 ehdrp->e_machine);
+	(*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+			       bfd_archive_filename (abfd),
+			       ehdrp->e_machine);
 
 	bfd_set_error (bfd_error_wrong_format);
 	return false;
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.45
diff -u -p -r1.45 elf32-hppa.c
--- elf32-hppa.c	2001/09/20 10:37:34	1.45
+++ elf32-hppa.c	2001/09/20 16:55:27
@@ -623,7 +623,7 @@ hppa_get_stub_entry (input_section, sym_
 	{
 	  if (hash == NULL || hash->elf.root.type != bfd_link_hash_undefweak)
 	    (*_bfd_error_handler) (_("%s(%s+0x%lx): cannot find stub entry %s"),
-				   bfd_get_filename (input_section->owner),
+				   bfd_archive_filename (input_section->owner),
 				   input_section->name,
 				   (long) rel->r_offset,
 				   stub_name);
@@ -684,7 +684,7 @@ hppa_add_stub (stub_name, section, hplin
   if (stub_entry == NULL)
     {
       (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
-			     bfd_get_filename (section->owner),
+			     bfd_archive_filename (section->owner),
 			     stub_name);
       return NULL;
     }
@@ -878,7 +878,7 @@ hppa_build_one_stub (gen_entry, in_arg)
 	    {
 	      (*_bfd_error_handler)
 		(_("%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"),
-		 bfd_get_filename (stub_entry->target_section->owner),
+		 bfd_archive_filename (stub_entry->target_section->owner),
 		 stub_sec->name,
 		 (long) stub_entry->stub_offset,
 		 stub_entry->root.string);
@@ -1036,7 +1036,7 @@ hppa_build_one_stub (gen_entry, in_arg)
 	{
 	  (*_bfd_error_handler)
 	    (_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
-	     bfd_get_filename (stub_entry->target_section->owner),
+	     bfd_archive_filename (stub_entry->target_section->owner),
 	     stub_sec->name,
 	     (long) stub_entry->stub_offset,
 	     stub_entry->root.string);
@@ -1376,7 +1376,7 @@ elf32_hppa_check_relocs (abfd, info, sec
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: relocation %s can not be used when making a shared object; recompile with -fPIC"),
-		 bfd_get_filename (abfd),
+		 bfd_archive_filename (abfd),
 		 elf_hppa_howto_table[r_type].name);
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
@@ -1396,7 +1396,7 @@ elf32_hppa_check_relocs (abfd, info, sec
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: relocation %s should not be used when making a shared object; recompile with -fPIC"),
-		 bfd_get_filename (abfd),
+		 bfd_archive_filename (abfd),
 		 elf_hppa_howto_table[r_type].name);
 	    }
 	  /* Fall through.  */
@@ -2826,8 +2826,8 @@ elf32_hppa_size_stubs (output_bfd, stub_
 		  else
 		    {
 		      (*_bfd_error_handler) (_("%s: duplicate export stub %s"),
-			     bfd_get_filename (input_bfd),
-			     stub_name);
+					     bfd_archive_filename (input_bfd),
+					     stub_name);
 		    }
 		}
 	    }
@@ -3408,7 +3408,7 @@ final_link_relocate (input_section, cont
 #if 1 /* debug them.  */
 	      (*_bfd_error_handler)
 		(_("%s(%s+0x%lx): fixing %s"),
-		 bfd_get_filename (input_bfd),
+		 bfd_archive_filename (input_bfd),
 		 input_section->name,
 		 (long) rel->r_offset,
 		 howto->name);
@@ -3524,7 +3524,7 @@ final_link_relocate (input_section, cont
     {
       (*_bfd_error_handler)
 	(_("%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
-	 bfd_get_filename (input_bfd),
+	 bfd_archive_filename (input_bfd),
 	 input_section->name,
 	 (long) rel->r_offset,
 	 stub_entry->root.string);
@@ -4062,11 +4062,13 @@ elf32_hppa_relocate_section (output_bfd,
 	{
 	  (*_bfd_error_handler)
 	    (_("%s(%s+0x%lx): cannot handle %s for %s"),
-	     bfd_get_filename (input_bfd),
+	     bfd_archive_filename (input_bfd),
 	     input_section->name,
 	     (long) rel->r_offset,
 	     howto->name,
 	     sym_name);
+	  bfd_set_error (bfd_error_bad_value);
+	  return false;
 	}
       else
 	{
Index: bfd/elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf32-i370.c
--- elf32-i370.c	2001/09/18 09:57:23	1.10
+++ elf32-i370.c	2001/09/20 16:55:27
@@ -428,7 +428,7 @@ i370_elf_merge_private_bfd_data (ibfd, o
     {
       (*_bfd_error_handler)
 	("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)",
-	 bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+	 bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
 
       bfd_set_error (bfd_error_bad_value);
       return false;
@@ -536,8 +536,8 @@ i370_elf_create_linker_section (abfd, in
 	{
 	default:
 	  (*_bfd_error_handler) ("%s: Unknown special linker type %d",
-				 bfd_get_filename (abfd),
-				 (int)which);
+				 bfd_archive_filename (abfd),
+				 (int) which);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  return (elf_linker_section_t *)0;
@@ -1025,7 +1025,7 @@ i370_elf_check_relocs (abfd, info, sec, 
 #ifdef DEBUG
   fprintf (stderr, "i370_elf_check_relocs called for section %s in %s\n",
 	   bfd_get_section_name (abfd, sec),
-	   bfd_get_filename (abfd));
+	   bfd_archive_filename (abfd));
 #endif
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -1292,9 +1292,9 @@ i370_elf_relocate_section (output_bfd, i
 
 #ifdef DEBUG
   fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n",
-	   bfd_get_filename (input_bfd),
+	   bfd_archive_filename (input_bfd),
 	   bfd_section_name(input_bfd, input_section),
-	   (long)input_section->reloc_count,
+	   (long) input_section->reloc_count,
 	   (info->relocateable) ? " (relocatable)" : "");
 #endif
 
@@ -1322,8 +1322,8 @@ i370_elf_relocate_section (output_bfd, i
 	  || !i370_elf_howto_table[(int)r_type])
 	{
 	  (*_bfd_error_handler) ("%s: unknown relocation type %d",
-				 bfd_get_filename (input_bfd),
-				 (int)r_type);
+				 bfd_archive_filename (input_bfd),
+				 (int) r_type);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = false;
@@ -1420,12 +1420,13 @@ i370_elf_relocate_section (output_bfd, i
 	    }
 	}
 
-      switch ((int)r_type)
+      switch ((int) r_type)
 	{
 	default:
-	  (*_bfd_error_handler) ("%s: unknown relocation type %d for symbol %s",
-				 bfd_get_filename (input_bfd),
-				 (int)r_type, sym_name);
+	  (*_bfd_error_handler)
+	    ("%s: unknown relocation type %d for symbol %s",
+	     bfd_archive_filename (input_bfd),
+	     (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = false;
@@ -1582,10 +1583,11 @@ i370_elf_relocate_section (output_bfd, i
 
 	case (int)R_I370_COPY:
 	case (int)R_I370_RELATIVE:
-	  (*_bfd_error_handler) ("%s: Relocation %s is not yet supported for symbol %s.",
-				 bfd_get_filename (input_bfd),
-				 i370_elf_howto_table[ (int)r_type ]->name,
-				 sym_name);
+	  (*_bfd_error_handler)
+	    ("%s: Relocation %s is not yet supported for symbol %s.",
+	     bfd_archive_filename (input_bfd),
+	     i370_elf_howto_table[(int) r_type]->name,
+	     sym_name);
 
 	  bfd_set_error (bfd_error_invalid_operation);
 	  ret = false;
Index: bfd/elf32-i386.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.44
diff -u -p -r1.44 elf32-i386.c
--- elf32-i386.c	2001/09/20 10:37:35	1.44
+++ elf32-i386.c	2001/09/20 16:55:29
@@ -289,7 +289,7 @@ elf_i386_info_to_howto_rel (abfd, cache_
 	  >= R_386_vt - R_386_ext))
     {
       (*_bfd_error_handler) (_("%s: invalid relocation type %d"),
-			     bfd_get_filename (abfd), (int) r_type);
+			     bfd_archive_filename (abfd), (int) r_type);
       indx = (unsigned int) R_386_NONE;
     }
   cache_ptr->howto = &elf_howto_table[indx];
@@ -581,15 +581,9 @@ elf_i386_check_relocs (abfd, info, sec, 
 
       if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  if (abfd->my_archive)
-	    (*_bfd_error_handler) (_("%s(%s): bad symbol index: %d"),
-				   bfd_get_filename (abfd->my_archive),
-				   bfd_get_filename (abfd),
-				   r_symndx);
-	  else
-	    (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
-				   bfd_get_filename (abfd),
-				   r_symndx);
+	  (*_bfd_error_handler) (_("%s: bad symbol index: %d"),
+				 bfd_archive_filename (abfd),
+				 r_symndx);
 	  return false;
 	}
 
@@ -748,15 +742,9 @@ elf_i386_check_relocs (abfd, info, sec, 
 		      || strcmp (bfd_get_section_name (abfd, sec),
 				 name + 4) != 0)
 		    {
-		      if (abfd->my_archive)
-			(*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"),
-					       bfd_get_filename (abfd->my_archive),
-					       bfd_get_filename (abfd),
-					       name);
-		      else
-			(*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
-					       bfd_get_filename (abfd),
-					       name);
+		      (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"),
+					     bfd_archive_filename (abfd),
+					     name);
 		    }
 
 		  sreloc = bfd_get_section_by_name (dynobj, name);
@@ -1744,17 +1732,9 @@ elf_i386_relocate_section (output_bfd, i
 						       input_section),
 				 name + 4) != 0)
 		    {
-		      if (input_bfd->my_archive)
-			(*_bfd_error_handler)\
-			  (_("%s(%s): bad relocation section name `%s\'"),
-			   bfd_get_filename (input_bfd->my_archive),
-			   bfd_get_filename (input_bfd),
-			   name);
-		      else
-			(*_bfd_error_handler)
-			  (_("%s: bad relocation section name `%s\'"),
-			   bfd_get_filename (input_bfd),
-			   name);
+		      (*_bfd_error_handler)
+			(_("%s: bad relocation section name `%s\'"),
+			 bfd_archive_filename (input_bfd), name);
 		      return false;
 		    }
 
@@ -1836,7 +1816,7 @@ elf_i386_relocate_section (output_bfd, i
 	       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
 	(*_bfd_error_handler)
 	  (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
-	   bfd_get_filename (input_bfd),
+	   bfd_archive_filename (input_bfd),
 	   bfd_get_section_name (input_bfd, input_section),
 	   (long) rel->r_offset,
 	   h->root.root.string);
Index: bfd/elf32-m32r.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32r.c,v
retrieving revision 1.15
diff -u -p -r1.15 elf32-m32r.c
--- elf32-m32r.c	2001/09/18 09:57:23	1.15
+++ elf32-m32r.c	2001/09/20 16:55:30
@@ -1008,7 +1008,7 @@ m32r_elf_relocate_section (output_bfd, i
       if (r_type < 0 || r_type >= (int) R_M32R_max)
 	{
 	  (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = false;
@@ -1215,11 +1215,12 @@ m32r_elf_relocate_section (output_bfd, i
 		  }
 		else
 		  {
-		    (*_bfd_error_handler) (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
-					   bfd_get_filename (input_bfd),
-					   sym_name,
-					   m32r_elf_howto_table[(int) r_type].name,
-					   bfd_get_section_name (abfd, sec));
+		    (*_bfd_error_handler)
+		      (_("%s: The target (%s) of an %s relocation is in the wrong section (%s)"),
+		       bfd_archive_filename (input_bfd),
+		       sym_name,
+		       m32r_elf_howto_table[(int) r_type].name,
+		       bfd_get_section_name (abfd, sec));
 		    /*bfd_set_error (bfd_error_bad_value); ??? why? */
 		    ret = false;
 		    continue;
@@ -2016,8 +2017,9 @@ m32r_elf_merge_private_bfd_data (ibfd, o
     {
       if ((in_flags & EF_M32R_ARCH) != E_M32R_ARCH)
 	{
-	  _bfd_error_handler (_("%s: Instruction set mismatch with previous modules"),
-			      bfd_get_filename (ibfd));
+	  (*_bfd_error_handler)
+	    (_("%s: Instruction set mismatch with previous modules"),
+	     bfd_archive_filename (ibfd));
 
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
Index: bfd/elf32-mcore.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mcore.c,v
retrieving revision 1.16
diff -u -p -r1.16 elf32-mcore.c
--- elf32-mcore.c	2001/09/18 09:57:23	1.16
+++ elf32-mcore.c	2001/09/20 16:55:31
@@ -371,7 +371,7 @@ mcore_elf_unsupported_reloc (abfd, reloc
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
 
   _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
-		      bfd_get_filename (abfd),
+		      bfd_archive_filename (abfd),
 		      reloc_entry->howto->name,
 		      reloc_entry->howto->type);
 
@@ -428,7 +428,7 @@ mcore_elf_relocate_section (output_bfd, 
 #ifdef DEBUG
   fprintf (stderr,
 	   "mcore_elf_relocate_section called for %s section %s, %ld relocations%s\n",
-	   bfd_get_filename (input_bfd),
+	   bfd_archive_filename (input_bfd),
 	   bfd_section_name(input_bfd, input_section),
 	   (long) input_section->reloc_count,
 	   (info->relocateable) ? " (relocatable)" : "");
@@ -456,7 +456,7 @@ mcore_elf_relocate_section (output_bfd, 
 	  || ! mcore_elf_howto_table [(int)r_type])
 	{
 	  _bfd_error_handler (_("%s: Unknown relocation type %d\n"),
-			      bfd_get_filename (input_bfd),
+			      bfd_archive_filename (input_bfd),
 			      (int) r_type);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -497,7 +497,7 @@ mcore_elf_relocate_section (output_bfd, 
       if (howto->special_function == mcore_elf_unsupported_reloc)
 	{
 	  _bfd_error_handler (_("%s: Relocation %s (%d) is not currently supported.\n"),
-			      bfd_get_filename (input_bfd),
+			      bfd_archive_filename (input_bfd),
 			      howto->name,
 			      (int)r_type);
 
Index: bfd/elf32-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mips.c,v
retrieving revision 1.113
diff -u -p -r1.113 elf32-mips.c
--- elf32-mips.c	2001/09/20 10:37:35	1.113
+++ elf32-mips.c	2001/09/20 16:55:40
@@ -2599,7 +2599,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
       old_flags &= ~EF_MIPS_PIC;
       (*_bfd_error_handler)
 	(_("%s: linking PIC files with non-PIC files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
       ok = false;
     }
 
@@ -2609,7 +2609,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
       old_flags &= ~EF_MIPS_CPIC;
       (*_bfd_error_handler)
 	(_("%s: linking abicalls files with non-abicalls files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
       ok = false;
     }
 
@@ -2638,7 +2638,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
 	    {
 	      (*_bfd_error_handler)
 	       (_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
-		bfd_get_filename (ibfd), new_isa, old_isa);
+		bfd_archive_filename (ibfd), new_isa, old_isa);
 	      ok = false;
 	    }
 	}
@@ -2647,7 +2647,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: ISA mismatch (%d) with previous modules (%d)"),
-	     bfd_get_filename (ibfd),
+	     bfd_archive_filename (ibfd),
 	     elf_mips_mach (new_flags),
 	     elf_mips_mach (old_flags));
 	  ok = false;
@@ -2670,7 +2670,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: ABI mismatch: linking %s module with previous %s modules"),
-	     bfd_get_filename (ibfd),
+	     bfd_archive_filename (ibfd),
 	     elf_mips_abi_name (ibfd),
 	     elf_mips_abi_name (obfd));
 	  ok = false;
@@ -2684,7 +2684,7 @@ _bfd_mips_elf_merge_private_bfd_data (ib
     {
       (*_bfd_error_handler)
 	(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	 bfd_get_filename (ibfd), (unsigned long) new_flags,
+	 bfd_archive_filename (ibfd), (unsigned long) new_flags,
 	 (unsigned long) old_flags);
       ok = false;
     }
@@ -6731,7 +6731,7 @@ mips_elf_perform_relocation (info, howto
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: %s+0x%lx: jump to stub routine which is not jal"),
-	     bfd_get_filename (input_bfd),
+	     bfd_archive_filename (input_bfd),
 	     input_section->name,
 	     (unsigned long) relocation->r_offset);
 	  bfd_set_error (bfd_error_bad_value);
@@ -7720,15 +7720,9 @@ _bfd_mips_elf_check_relocs (abfd, info, 
 	h = NULL;
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
 	{
-	  if (abfd->my_archive)
-	    (*_bfd_error_handler)
-	      (_("%s(%s) Malformed reloc detected for section %s"),
-	       bfd_get_filename (abfd->my_archive),
-	       bfd_get_filename (abfd), name);
-	  else
-	    (*_bfd_error_handler)
-	      (_("%s: Malformed reloc detected for section %s"),
-	       bfd_get_filename (abfd), name);
+	  (*_bfd_error_handler)
+	    (_("%s: Malformed reloc detected for section %s"),
+	     bfd_archive_filename (abfd), name);
 	  bfd_set_error (bfd_error_bad_value);
 	  return false;
 	}
@@ -7806,7 +7800,7 @@ _bfd_mips_elf_check_relocs (abfd, info, 
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: CALL16 reloc at 0x%lx not against global symbol"),
-		 bfd_get_filename (abfd), (unsigned long) rel->r_offset);
+		 bfd_archive_filename (abfd), (unsigned long) rel->r_offset);
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.29
diff -u -p -r1.29 elf32-ppc.c
--- elf32-ppc.c	2001/09/20 10:37:35	1.29
+++ elf32-ppc.c	2001/09/20 16:55:43
@@ -1452,7 +1452,7 @@ ppc_elf_merge_private_bfd_data (ibfd, ob
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
-	     bfd_get_filename (ibfd));
+	     bfd_archive_filename (ibfd));
 	}
       else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
 	       && (old_flags & EF_PPC_RELOCATABLE) != 0)
@@ -1460,7 +1460,7 @@ ppc_elf_merge_private_bfd_data (ibfd, ob
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
-	     bfd_get_filename (ibfd));
+	     bfd_archive_filename (ibfd));
 	}
 
       /* The output is -mrelocatable-lib iff both the input files are.  */
@@ -1486,7 +1486,7 @@ ppc_elf_merge_private_bfd_data (ibfd, ob
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	     bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
+	     bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
 	}
 
       if (error)
@@ -2083,7 +2083,7 @@ ppc_elf_check_relocs (abfd, info, sec, r
 #ifdef DEBUG
   fprintf (stderr, "ppc_elf_check_relocs called for section %s in %s\n",
 	   bfd_get_section_name (abfd, sec),
-	   bfd_get_filename (abfd));
+	   bfd_archive_filename (abfd));
 #endif
 
   /* Create the linker generated sections all the time so that the
@@ -2239,7 +2239,7 @@ ppc_elf_check_relocs (abfd, info, sec, r
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: relocation %s cannot be used when making a shared object"),
-		bfd_get_filename (abfd), "R_PPC_EMB_SDAI16"));
+		bfd_archive_filename (abfd), "R_PPC_EMB_SDAI16"));
 	      return false;
 	    }
 
@@ -2273,7 +2273,7 @@ ppc_elf_check_relocs (abfd, info, sec, r
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: relocation %s cannot be used when making a shared object"),
-		bfd_get_filename (abfd), "R_PPC_EMB_SDA2I16"));
+		bfd_archive_filename (abfd), "R_PPC_EMB_SDA2I16"));
 	      return false;
 	    }
 
@@ -2308,7 +2308,7 @@ ppc_elf_check_relocs (abfd, info, sec, r
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: relocation %s cannot be used when making a shared object"),
-		bfd_get_filename (abfd),
+		bfd_archive_filename (abfd),
 		ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
 	      return false;
 	    }
@@ -2923,7 +2923,7 @@ ppc_elf_relocate_section (output_bfd, in
 
 #ifdef DEBUG
   fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
-	   bfd_get_filename (input_bfd),
+	   bfd_archive_filename (input_bfd),
 	   bfd_section_name(input_bfd, input_section),
 	   (long) input_section->reloc_count,
 	   (info->relocateable) ? " (relocatable)" : "");
@@ -2962,7 +2962,7 @@ ppc_elf_relocate_section (output_bfd, in
 	  || !ppc_elf_howto_table[(int) r_type])
 	{
 	  (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 (int) r_type);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -3095,7 +3095,7 @@ ppc_elf_relocate_section (output_bfd, in
 		{
                   (*_bfd_error_handler)
                     (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-                     bfd_get_filename (input_bfd), h->root.root.string,
+                     bfd_archive_filename (input_bfd), h->root.root.string,
                      bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
@@ -3130,7 +3130,7 @@ ppc_elf_relocate_section (output_bfd, in
 	{
 	default:
 	  (*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -3494,7 +3494,7 @@ ppc_elf_relocate_section (output_bfd, in
 		&& strcmp (name, ".sbss") != 0)
 	      {
 		(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
-				       bfd_get_filename (input_bfd),
+				       bfd_archive_filename (input_bfd),
 				       sym_name,
 				       ppc_elf_howto_table[(int) r_type]->name,
 				       name);
@@ -3515,7 +3515,7 @@ ppc_elf_relocate_section (output_bfd, in
 	    if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
 	      {
 		(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
-				       bfd_get_filename (input_bfd),
+				       bfd_archive_filename (input_bfd),
 				       sym_name,
 				       ppc_elf_howto_table[(int) r_type]->name,
 				       name);
@@ -3565,7 +3565,7 @@ ppc_elf_relocate_section (output_bfd, in
 	    else
 	      {
 		(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
-				       bfd_get_filename (input_bfd),
+				       bfd_archive_filename (input_bfd),
 				       sym_name,
 				       ppc_elf_howto_table[(int) r_type]->name,
 				       name);
@@ -3631,7 +3631,7 @@ ppc_elf_relocate_section (output_bfd, in
 	case (int) R_PPC_EMB_RELST_HA:
 	case (int) R_PPC_EMB_BIT_FLD:
 	  (*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 ppc_elf_howto_table[(int) r_type]->name,
 				 sym_name);
 
Index: bfd/elf32-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-s390.c,v
retrieving revision 1.6
diff -u -p -r1.6 elf32-s390.c
--- elf32-s390.c	2001/09/20 10:37:35	1.6
+++ elf32-s390.c	2001/09/20 16:55:45
@@ -1433,7 +1433,7 @@ elf_s390_relocate_section (output_bfd, i
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.33
diff -u -p -r1.33 elf32-sh.c
--- elf32-sh.c	2001/09/20 10:37:35	1.33
+++ elf32-sh.c	2001/09/20 16:55:47
@@ -1096,7 +1096,7 @@ sh_elf_relax_section (abfd, sec, link_in
       if (laddr >= sec->_raw_size)
 	{
 	  (*_bfd_error_handler) (_("%s: 0x%lx: warning: bad R_SH_USES offset"),
-				 bfd_get_filename (abfd),
+				 bfd_archive_filename (abfd),
 				 (unsigned long) irel->r_offset);
 	  continue;
 	}
@@ -1108,7 +1108,7 @@ sh_elf_relax_section (abfd, sec, link_in
 	{
 	  ((*_bfd_error_handler)
 	   (_("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
-	    bfd_get_filename (abfd), (unsigned long) irel->r_offset, insn));
+	    bfd_archive_filename (abfd), (unsigned long) irel->r_offset, insn));
 	  continue;
 	}
 
@@ -1125,7 +1125,7 @@ sh_elf_relax_section (abfd, sec, link_in
 	{
 	  ((*_bfd_error_handler)
 	   (_("%s: 0x%lx: warning: bad R_SH_USES load offset"),
-	    bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+	    bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
 	  continue;
 	}
 
@@ -1140,7 +1140,7 @@ sh_elf_relax_section (abfd, sec, link_in
 	{
 	  ((*_bfd_error_handler)
 	   (_("%s: 0x%lx: warning: could not find expected reloc"),
-	    bfd_get_filename (abfd), (unsigned long) paddr));
+	    bfd_archive_filename (abfd), (unsigned long) paddr));
 	  continue;
 	}
 
@@ -1176,7 +1176,7 @@ sh_elf_relax_section (abfd, sec, link_in
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: 0x%lx: warning: symbol in unexpected section"),
-		bfd_get_filename (abfd), (unsigned long) paddr));
+		bfd_archive_filename (abfd), (unsigned long) paddr));
 	      continue;
 	    }
 
@@ -1298,7 +1298,7 @@ sh_elf_relax_section (abfd, sec, link_in
 	{
 	  ((*_bfd_error_handler)
 	   (_("%s: 0x%lx: warning: could not find expected COUNT reloc"),
-	    bfd_get_filename (abfd), (unsigned long) paddr));
+	    bfd_archive_filename (abfd), (unsigned long) paddr));
 	  continue;
 	}
 
@@ -1307,7 +1307,7 @@ sh_elf_relax_section (abfd, sec, link_in
       if (irelcount->r_addend == 0)
 	{
 	  ((*_bfd_error_handler) (_("%s: 0x%lx: warning: bad count"),
-				  bfd_get_filename (abfd),
+				  bfd_archive_filename (abfd),
 				  (unsigned long) paddr));
 	  continue;
 	}
@@ -1701,7 +1701,7 @@ sh_elf_relax_delete_bytes (abfd, sec, ad
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
-		bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+		bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -2091,7 +2091,7 @@ sh_elf_swap_insns (abfd, sec, relocs, co
 	    {
 	      ((*_bfd_error_handler)
 	       (_("%s: 0x%lx: fatal: reloc overflow while relaxing"),
-		bfd_get_filename (abfd), (unsigned long) irel->r_offset));
+		bfd_archive_filename (abfd), (unsigned long) irel->r_offset));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -3103,7 +3103,7 @@ sh_elf_relocate_section (output_bfd, inf
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
@@ -3169,7 +3169,7 @@ sh_elf_relocate_section (output_bfd, inf
 		{
 		  ((*_bfd_error_handler)
 		   (_("%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
-		    bfd_get_filename (input_section->owner),
+		    bfd_archive_filename (input_section->owner),
 		    (unsigned long) rel->r_offset));
 		  bfd_set_error (bfd_error_bad_value);
 		  return false;
@@ -4091,7 +4091,7 @@ sh_elf_merge_private_data (ibfd, obfd)
     {
       (*_bfd_error_handler)
 	("%s: uses %s instructions while previous modules use %s instructions",
-	 bfd_get_filename (ibfd),
+	 bfd_archive_filename (ibfd),
 	 EF_SH_HAS_DSP (new_flags) ? "dsp" : "floating point",
 	 EF_SH_HAS_DSP (new_flags) ? "floating point" : "dsp");
       bfd_set_error (bfd_error_bad_value);
Index: bfd/elf32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
retrieving revision 1.26
diff -u -p -r1.26 elf32-sparc.c
--- elf32-sparc.c	2001/09/20 10:37:35	1.26
+++ elf32-sparc.c	2001/09/20 16:55:50
@@ -1535,7 +1535,7 @@ elf32_sparc_relocate_section (output_bfd
 			      BFD_FAIL ();
 			      (*_bfd_error_handler)
 				(_("%s: probably compiled without -fPIC?"),
-				 bfd_get_filename (input_bfd));
+				 bfd_archive_filename (input_bfd));
 			      bfd_set_error (bfd_error_bad_value);
 			      return false;
 			    }
@@ -1988,7 +1988,7 @@ elf32_sparc_merge_private_bfd_data (ibfd
       error = true;
       (*_bfd_error_handler)
 	(_("%s: compiled for a 64 bit system and target is 32 bit"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
     }
   else if ((ibfd->flags & DYNAMIC) == 0)
     {
@@ -2002,7 +2002,7 @@ elf32_sparc_merge_private_bfd_data (ibfd
     {
       (*_bfd_error_handler)
 	(_("%s: linking little endian files with big endian files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
       error = true;
     }
   previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
Index: bfd/elf32-v850.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-v850.c,v
retrieving revision 1.15
diff -u -p -r1.15 elf32-v850.c
--- elf32-v850.c	2001/09/18 09:57:24	1.15
+++ elf32-v850.c	2001/09/20 16:55:52
@@ -590,7 +590,7 @@ v850_elf_check_relocs (abfd, info, sec, 
 #ifdef DEBUG
   fprintf (stderr, "v850_elf_check_relocs called for section %s in %s\n",
 	   bfd_get_section_name (abfd, sec),
-	   bfd_get_filename (abfd));
+	   bfd_archive_filename (abfd));
 #endif
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -1906,7 +1906,7 @@ v850_elf_merge_private_bfd_data (ibfd, o
   if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
       && (in_flags & EF_V850_ARCH) != E_V850_ARCH)
     _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
-			bfd_get_filename (ibfd));
+			bfd_archive_filename (ibfd));
 
   return true;
 }
Index: bfd/elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.41
diff -u -p -r1.41 elf64-alpha.c
--- elf64-alpha.c	2001/09/20 10:37:35	1.41
+++ elf64-alpha.c	2001/09/20 16:55:55
@@ -1010,8 +1010,8 @@ elf64_alpha_relax_with_lituse (info, sym
     {
       ((*_bfd_error_handler)
        ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
-	bfd_get_filename (info->abfd), info->sec->name,
-	(unsigned long)irel->r_offset));
+	bfd_archive_filename (info->abfd), info->sec->name,
+	(unsigned long) irel->r_offset));
       return irel;
     }
 
@@ -1307,7 +1307,7 @@ elf64_alpha_relax_without_lituse (info, 
     {
       ((*_bfd_error_handler)
        ("%s: %s+0x%lx: warning: LITERAL relocation against unexpected insn",
-	bfd_get_filename (info->abfd), info->sec->name,
+	bfd_archive_filename (info->abfd), info->sec->name,
 	(unsigned long) irel->r_offset));
       return true;
     }
@@ -2907,7 +2907,7 @@ elf64_alpha_size_got_sections (output_bf
 	      /* Yikes! A single object file has too many entries.  */
 	      (*_bfd_error_handler)
 	        (_("%s: .got subsegment exceeds 64K (size %d)"),
-	         bfd_get_filename (i),
+	         bfd_archive_filename (i),
 	         alpha_elf_tdata (this_got)->total_got_entries * 8);
 	      return false;
 	    }
@@ -3461,7 +3461,7 @@ elf64_alpha_relocate_section (output_bfd
             {
               (*_bfd_error_handler)
                 (_("%s: gp-relative relocation against dynamic symbol %s"),
-                 bfd_get_filename (input_bfd), h->root.root.root.string);
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
               ret_val = false;
             }
 	  BFD_ASSERT(gp != 0);
@@ -3473,7 +3473,7 @@ elf64_alpha_relocate_section (output_bfd
             {
               (*_bfd_error_handler)
                 (_("%s: gp-relative relocation against dynamic symbol %s"),
-                 bfd_get_filename (input_bfd), h->root.root.root.string);
+                 bfd_archive_filename (input_bfd), h->root.root.root.string);
               ret_val = false;
             }
 	  BFD_ASSERT(gp != 0);
Index: bfd/elf64-gen.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-gen.c,v
retrieving revision 1.7
diff -u -p -r1.7 elf64-gen.c
--- elf64-gen.c	2001/08/10 06:00:53	1.7
+++ elf64-gen.c	2001/09/20 16:55:55
@@ -79,15 +79,9 @@ elf64_generic_link_add_symbols (abfd, in
 	Elf_Internal_Ehdr *ehdrp;
 
 	ehdrp = elf_elfheader (abfd);
-	if (abfd->my_archive)
-	  (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
-				 bfd_get_filename (abfd->my_archive),
-				 bfd_get_filename (abfd),
-				 ehdrp->e_machine);
-	else
-	  (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
-				 bfd_get_filename (abfd),
-				 ehdrp->e_machine);
+	(*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+			       bfd_archive_filename (abfd),
+			       ehdrp->e_machine);
 
 	bfd_set_error (bfd_error_wrong_format);
 	return false;
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.3
diff -u -p -r1.3 elf64-ppc.c
--- elf64-ppc.c	2001/09/20 10:37:35	1.3
+++ elf64-ppc.c	2001/09/20 16:55:57
@@ -1454,7 +1454,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, 
       else
 	msg = _("%s: compiled for a little endian system and target is big endian");
 
-      (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
+      (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_wrong_format);
       return false;
@@ -1488,7 +1488,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, 
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
-	     bfd_get_filename (ibfd));
+	     bfd_archive_filename (ibfd));
 	}
       else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
 	       && (old_flags & EF_PPC_RELOCATABLE) != 0)
@@ -1496,7 +1496,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, 
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
-	     bfd_get_filename (ibfd));
+	     bfd_archive_filename (ibfd));
 	}
 
       /* The output is -mrelocatable-lib iff both the input files are.  */
@@ -1523,7 +1523,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, 
 	  error = true;
 	  (*_bfd_error_handler)
 	    (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-	     bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
+	     bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
 	}
 
       if (error)
@@ -1632,7 +1632,7 @@ ppc64_elf_check_relocs (abfd, info, sec,
 #ifdef DEBUG
   fprintf (stderr, "ppc64_elf_check_relocs called for section %s in %s\n",
 	   bfd_get_section_name (abfd, sec),
-	   bfd_get_filename (abfd));
+	   bfd_archive_filename (abfd));
 #endif
 
   dynobj = elf_hash_table (info)->dynobj;
@@ -2670,7 +2670,7 @@ ppc64_elf_relocate_section (output_bfd, 
 
 #ifdef DEBUG
   fprintf (stderr, "ppc64_elf_relocate_section called for %s section %s, %ld relocations%s\n",
-	   bfd_get_filename (input_bfd),
+	   bfd_archive_filename (input_bfd),
 	   bfd_section_name (input_bfd, input_section),
 	   (long) input_section->reloc_count,
 	   (info->relocateable) ? " (relocatable)" : "");
@@ -2726,7 +2726,7 @@ ppc64_elf_relocate_section (output_bfd, 
 	  || !ppc64_elf_howto_table[(int) r_type])
 	{
 	  (*_bfd_error_handler) (_("%s: unknown relocation type %d"),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 (int) r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret = false;
@@ -2879,7 +2879,7 @@ ppc64_elf_relocate_section (output_bfd, 
 	  if (((relocation + addend) & 3) != 0)
 	    {
 	      (*_bfd_error_handler) (_("%s: error: relocation %s not a multiple of 4"),
-				     bfd_get_filename (input_bfd),
+				     bfd_archive_filename (input_bfd),
 				     howto->name);
 	      bfd_set_error (bfd_error_bad_value);
 	      ret = false;
@@ -2892,7 +2892,7 @@ ppc64_elf_relocate_section (output_bfd, 
 	{
 	default:
 	  (*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 (int) r_type, sym_name);
 
 	  bfd_set_error (bfd_error_bad_value);
@@ -3309,7 +3309,7 @@ ppc64_elf_relocate_section (output_bfd, 
 	case (int) R_PPC64_PLTGOT16_HI:
 	case (int) R_PPC64_PLTGOT16_HA:
 	  (*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."),
-				 bfd_get_filename (input_bfd),
+				 bfd_archive_filename (input_bfd),
 				 ppc64_elf_howto_table[(int) r_type]->name,
 				 sym_name);
 
Index: bfd/elf64-s390.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-s390.c,v
retrieving revision 1.6
diff -u -p -r1.6 elf64-s390.c
--- elf64-s390.c	2001/09/20 10:37:35	1.6
+++ elf64-s390.c	2001/09/20 16:55:58
@@ -1421,7 +1421,7 @@ elf_s390_relocate_section (output_bfd, i
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
Index: bfd/elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.35
diff -u -p -r1.35 elf64-sparc.c
--- elf64-sparc.c	2001/09/20 10:37:35	1.35
+++ elf64-sparc.c	2001/09/20 16:56:01
@@ -1269,7 +1269,7 @@ sparc64_elf_check_relocs (abfd, info, se
 
 	default:
 	  (*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
-				bfd_get_filename(abfd),
+				bfd_archive_filename (abfd),
 				ELF64_R_TYPE_ID (rel->r_info));
 	  return false;
 	}
@@ -1306,7 +1306,7 @@ sparc64_elf_add_symbol_hook (abfd, info,
 	default:
           (*_bfd_error_handler)
             (_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
-             bfd_get_filename (abfd));
+             bfd_archive_filename (abfd));
 	  return false;
 	}
 
@@ -1325,11 +1325,12 @@ sparc64_elf_add_symbol_hook (abfd, info,
       if (p->name != NULL && strcmp (p->name, *namep))
 	{
           (*_bfd_error_handler)
-            (_("Register %%g%d used incompatibly: "
-               "previously declared in %s to %s, in %s redefined to %s"),
-             (int)sym->st_value,
-             bfd_get_filename (p->abfd), *p->name ? p->name : "#scratch",
-             bfd_get_filename (abfd), **namep ? *namep : "#scratch");
+            (_("Register %%g%d used incompatibly: in %s redefined to %s"),
+             (int) sym->st_value,
+             bfd_archive_filename (abfd), **namep ? *namep : "#scratch");
+          (*_bfd_error_handler)
+            (_("  previously declared in %s to %s"),
+             bfd_archive_filename (p->abfd), *p->name ? p->name : "#scratch");
 	  return false;
 	}
 
@@ -1346,11 +1347,14 @@ sparc64_elf_add_symbol_hook (abfd, info,
 		{
 		  unsigned char type = h->type;
 
-		  if (type > STT_FUNC) type = 0;
+		  if (type > STT_FUNC)
+		    type = 0;
+		  (*_bfd_error_handler)
+		    (_("Symbol `%s' has differing types: %s in %s"),
+		     *namep, "REGISTER", bfd_archive_filename (abfd));
 		  (*_bfd_error_handler)
-		    (_("Symbol `%s' has differing types: "
-		       "previously %s, REGISTER in %s"),
-		     *namep, stt_types [type], bfd_get_filename (abfd));
+		    (_("  previously %s in %s"),
+		     stt_types[type], bfd_archive_filename (p->abfd));
 		  return false;
 		}
 
@@ -1392,12 +1396,14 @@ sparc64_elf_add_symbol_hook (abfd, info,
 	  {
 	    unsigned char type = ELF_ST_TYPE (sym->st_info);
 
-	    if (type > STT_FUNC) type = 0;
+	    if (type > STT_FUNC)
+	      type = 0;
+	    (*_bfd_error_handler)
+	      (_("Symbol `%s' has differing types: %s in %s"),
+	       *namep, stt_types[type], bfd_archive_filename (abfd));
 	    (*_bfd_error_handler)
-	      (_("Symbol `%s' has differing types: "
-		 "REGISTER in %s, %s in %s"),
-	       *namep, bfd_get_filename (p->abfd), stt_types [type],
-	       bfd_get_filename (abfd));
+	      (_("  previously %s in %s"),
+	       "REGISTER", bfd_archive_filename (p->abfd));
 	    return false;
 	  }
     }
@@ -2272,7 +2278,7 @@ sparc64_elf_relocate_section (output_bfd
 				BFD_FAIL ();
 				(*_bfd_error_handler)
 				  (_("%s: probably compiled without -fPIC?"),
-				   bfd_get_filename (input_bfd));
+				   bfd_archive_filename (input_bfd));
 				bfd_set_error (bfd_error_bad_value);
 				return false;
 			      }
@@ -3002,7 +3008,7 @@ sparc64_elf_merge_private_bfd_data (ibfd
 	      error = true;
 	      (*_bfd_error_handler)
 		(_("%s: linking UltraSPARC specific with HAL specific code"),
-		 bfd_get_filename (ibfd));
+		 bfd_archive_filename (ibfd));
 	    }
 	  /* Choose the most restrictive memory ordering.  */
 	  old_mm = (old_flags & EF_SPARCV9_MM);
@@ -3021,7 +3027,7 @@ sparc64_elf_merge_private_bfd_data (ibfd
           error = true;
           (*_bfd_error_handler)
             (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-             bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+             bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
         }
 
       elf_elfheader (obfd)->e_flags = old_flags;
Index: bfd/elf64-x86-64.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v
retrieving revision 1.25
diff -u -p -r1.25 elf64-x86-64.c
--- elf64-x86-64.c	2001/09/20 10:37:35	1.25
+++ elf64-x86-64.c	2001/09/20 16:56:02
@@ -1289,7 +1289,7 @@ elf64_x86_64_relocate_section (output_bf
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
-		     bfd_get_filename (input_bfd), h->root.root.string,
+		     bfd_archive_filename (input_bfd), h->root.root.string,
 		     bfd_get_section_name (input_bfd, input_section));
 		  relocation = 0;
 		}
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.20
diff -u -p -r1.20 elflink.c
--- elflink.c	2001/09/18 09:57:24	1.20
+++ elflink.c	2001/09/20 16:56:03
@@ -431,10 +431,10 @@ _bfd_elf_create_linker_section (abfd, in
 	  s->_raw_size += lsect->hole_size;
 	  if (lsect->hole_offset > lsect->max_hole_offset)
 	    {
-	      (*_bfd_error_handler) (_("%s: Section %s is already to large to put hole of %ld bytes in"),
+	      (*_bfd_error_handler) (_("%s: Section %s is too large to add hole of %ld bytes"),
 				     bfd_get_filename (abfd),
 				     lsect->name,
-				     (long)lsect->hole_size);
+				     (long) lsect->hole_size);
 
 	      bfd_set_error (bfd_error_bad_value);
 	      return (elf_linker_section_t *)0;
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.106
diff -u -p -r1.106 elflink.h
--- elflink.h	2001/09/18 09:57:24	1.106
+++ elflink.h	2001/09/20 16:56:09
@@ -1485,7 +1485,7 @@ elf_link_add_object_symbols (abfd, info)
 			{
 			  (*_bfd_error_handler)
 			    (_("%s: %s: invalid version %u (max %d)"),
-			     bfd_get_filename (abfd), name, vernum,
+			     bfd_archive_filename (abfd), name, vernum,
 			     elf_tdata (abfd)->dynverdef_hdr.sh_info);
 			  bfd_set_error (bfd_error_bad_value);
 			  goto error_return;
@@ -1526,7 +1526,7 @@ elf_link_add_object_symbols (abfd, info)
 			{
 			  (*_bfd_error_handler)
 			    (_("%s: %s: invalid needed version %d"),
-			     bfd_get_filename (abfd), name, vernum);
+			     bfd_archive_filename (abfd), name, vernum);
 			  bfd_set_error (bfd_error_bad_value);
 			  goto error_return;
 			}
@@ -1647,7 +1647,7 @@ elf_link_add_object_symbols (abfd, info)
 		(*_bfd_error_handler)
 		  (_("Warning: size of symbol `%s' changed from %lu to %lu in %s"),
 		   name, (unsigned long) h->size, (unsigned long) sym.st_size,
-		   bfd_get_filename (abfd));
+		   bfd_archive_filename (abfd));
 
 	      h->size = sym.st_size;
 	    }
@@ -1669,7 +1669,7 @@ elf_link_add_object_symbols (abfd, info)
 		(*_bfd_error_handler)
 		  (_("Warning: type of symbol `%s' changed from %d to %d in %s"),
 		   name, h->type, ELF_ST_TYPE (sym.st_info),
-		   bfd_get_filename (abfd));
+		   bfd_archive_filename (abfd));
 
 	      h->type = ELF_ST_TYPE (sym.st_info);
 	    }
@@ -1892,7 +1892,7 @@ elf_link_add_object_symbols (abfd, info)
                          do in the case above.  */
 		      (*_bfd_error_handler)
 			(_("%s: warning: unexpected redefinition of `%s'"),
-			 bfd_get_filename (abfd), shortname);
+			 bfd_archive_filename (abfd), shortname);
 		    }
 		  else
 		    {
@@ -6009,7 +6009,7 @@ elf_link_input_bfd (finfo, input_bfd)
 		  if (isec->symbol->value != isym->st_value)
 		    (*_bfd_error_handler)
 		      (_("%s: invalid section symbol index 0x%x (%s) ignored"),
-		       bfd_get_filename (input_bfd), isym->st_shndx,
+		       bfd_archive_filename (input_bfd), isym->st_shndx,
 		       name);
 		  continue;
 		}
@@ -7288,7 +7288,7 @@ elf_gc_record_vtinherit (abfd, sec, h, o
     }
 
   (*_bfd_error_handler) ("%s: %s+%lu: No symbol found for INHERIT",
-			 bfd_get_filename (abfd), sec->name,
+			 bfd_archive_filename (abfd), sec->name,
 			 (unsigned long) offset);
   bfd_set_error (bfd_error_invalid_operation);
   return false;
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.23
diff -u -p -r1.23 elfxx-ia64.c
--- elfxx-ia64.c	2001/09/20 10:37:35	1.23
+++ elfxx-ia64.c	2001/09/20 16:56:13
@@ -3434,7 +3434,7 @@ elfNN_ia64_relocate_section (output_bfd,
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: unknown relocation type %d"),
-	     bfd_get_filename (input_bfd), (int)r_type);
+	     bfd_archive_filename (input_bfd), (int)r_type);
 	  bfd_set_error (bfd_error_bad_value);
 	  ret_val = false;
 	  continue;
@@ -3594,7 +3594,7 @@ elfNN_ia64_relocate_section (output_bfd,
 			 shared libraries.  Hork.  */
 		      (*_bfd_error_handler)
 			(_("%s: linking non-pic code in a shared library"),
-			 bfd_get_filename (input_bfd));
+			 bfd_archive_filename (input_bfd));
 		      ret_val = false;
 		      continue;
 		    }
@@ -3627,7 +3627,7 @@ elfNN_ia64_relocate_section (output_bfd,
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: @gprel relocation against dynamic symbol %s"),
-		 bfd_get_filename (input_bfd), h->root.root.string);
+		 bfd_archive_filename (input_bfd), h->root.root.string);
 	      ret_val = false;
 	      continue;
 	    }
@@ -3765,7 +3765,7 @@ elfNN_ia64_relocate_section (output_bfd,
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: dynamic relocation against speculation fixup"),
-		 bfd_get_filename (input_bfd));
+		 bfd_archive_filename (input_bfd));
 	      ret_val = false;
 	      continue;
 	    }
@@ -3773,7 +3773,7 @@ elfNN_ia64_relocate_section (output_bfd,
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: speculation fixup against undefined weak symbol"),
-		 bfd_get_filename (input_bfd));
+		 bfd_archive_filename (input_bfd));
 	      ret_val = false;
 	      continue;
 	    }
@@ -4254,7 +4254,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd,
     {
       (*_bfd_error_handler)
 	(_("%s: linking trap-on-NULL-dereference with non-trapping files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_bad_value);
       ok = false;
@@ -4263,7 +4263,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd,
     {
       (*_bfd_error_handler)
 	(_("%s: linking big-endian files with little-endian files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_bad_value);
       ok = false;
@@ -4272,7 +4272,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd,
     {
       (*_bfd_error_handler)
 	(_("%s: linking 64-bit files with 32-bit files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_bad_value);
       ok = false;
@@ -4281,7 +4281,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd,
     {
       (*_bfd_error_handler)
 	(_("%s: linking constant-gp files with non-constant-gp files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_bad_value);
       ok = false;
@@ -4291,7 +4291,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd,
     {
       (*_bfd_error_handler)
 	(_("%s: linking auto-pic files with non-auto-pic files"),
-	 bfd_get_filename (ibfd));
+	 bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_bad_value);
       ok = false;
Index: bfd/ieee.c
===================================================================
RCS file: /cvs/src/src/bfd/ieee.c,v
retrieving revision 1.20
diff -u -p -r1.20 ieee.c
--- ieee.c	2001/09/19 05:33:12	1.20
+++ ieee.c	2001/09/20 16:56:15
@@ -875,7 +875,7 @@ ieee_slurp_external_symbols (abfd)
 		  default:
 		    (*_bfd_error_handler)
 		      (_("%s: unimplemented ATI record  %u for symbol %u"),
-		       bfd_get_filename (abfd), symbol_attribute_def,
+		       bfd_archive_filename (abfd), symbol_attribute_def,
 		       symbol_name_index);
 		    bfd_set_error (bfd_error_bad_value);
 		    return false;
@@ -900,7 +900,7 @@ ieee_slurp_external_symbols (abfd)
 		  {
 		    (*_bfd_error_handler)
 		      (_("%s: unexpected ATN type %d in external part"),
-			 bfd_get_filename (abfd), (int) value);
+			 bfd_archive_filename (abfd), (int) value);
 		    bfd_set_error (bfd_error_bad_value);
 		    return false;
 		  }
@@ -922,7 +922,7 @@ ieee_slurp_external_symbols (abfd)
 		      default:
 			(*_bfd_error_handler)
 			  (_("%s: unexpected type after ATN"),
-			     bfd_get_filename (abfd));
+			     bfd_archive_filename (abfd));
 			bfd_set_error (bfd_error_bad_value);
 			return false;
 		      }
Index: bfd/ihex.c
===================================================================
RCS file: /cvs/src/src/bfd/ihex.c,v
retrieving revision 1.8
diff -u -p -r1.8 ihex.c
--- ihex.c	2001/09/19 05:33:12	1.8
+++ ihex.c	2001/09/20 16:56:16
@@ -257,7 +257,7 @@ ihex_bad_byte (abfd, lineno, c, error)
 	}
       (*_bfd_error_handler)
 	(_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
-	 bfd_get_filename (abfd), lineno, buf);
+	 bfd_archive_filename (abfd), lineno, buf);
       bfd_set_error (bfd_error_bad_value);
     }
 }
@@ -367,7 +367,7 @@ ihex_scan (abfd)
 	    {
 	      (*_bfd_error_handler)
 		(_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
-		 bfd_get_filename (abfd), lineno,
+		 bfd_archive_filename (abfd), lineno,
 		 (- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
 	      bfd_set_error (bfd_error_bad_value);
 	      goto error_return;
@@ -421,7 +421,7 @@ ihex_scan (abfd)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s:%u: bad extended address record length in Intel Hex file"),
-		     bfd_get_filename (abfd), lineno);
+		     bfd_archive_filename (abfd), lineno);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -438,7 +438,7 @@ ihex_scan (abfd)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s:%u: bad extended start address length in Intel Hex file"),
-		     bfd_get_filename (abfd), lineno);
+		     bfd_archive_filename (abfd), lineno);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -455,7 +455,7 @@ ihex_scan (abfd)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s:%u: bad extended linear address record length in Intel Hex file"),
-		     bfd_get_filename (abfd), lineno);
+		     bfd_archive_filename (abfd), lineno);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -472,7 +472,7 @@ ihex_scan (abfd)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s:%u: bad extended linear start address length in Intel Hex file"),
-		     bfd_get_filename (abfd), lineno);
+		     bfd_archive_filename (abfd), lineno);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -489,7 +489,7 @@ ihex_scan (abfd)
 	    default:
 	      (*_bfd_error_handler)
 		(_("%s:%u: unrecognized ihex type %u in Intel Hex file\n"),
-		 bfd_get_filename (abfd), lineno, type);
+		 bfd_archive_filename (abfd), lineno, type);
 	      bfd_set_error (bfd_error_bad_value);
 	      goto error_return;
 	    }
@@ -609,7 +609,7 @@ ihex_read_section (abfd, section, conten
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: internal error in ihex_read_section"),
-	     bfd_get_filename (abfd));
+	     bfd_archive_filename (abfd));
 	  bfd_set_error (bfd_error_bad_value);
 	  goto error_return;
 	}
@@ -644,7 +644,7 @@ ihex_read_section (abfd, section, conten
     {
       (*_bfd_error_handler)
 	(_("%s: bad section length in ihex_read_section"),
-	 bfd_get_filename (abfd));
+	 bfd_archive_filename (abfd));
       bfd_set_error (bfd_error_bad_value);
       goto error_return;
     }
Index: bfd/libbfd.c
===================================================================
RCS file: /cvs/src/src/bfd/libbfd.c,v
retrieving revision 1.18
diff -u -p -r1.18 libbfd.c
--- libbfd.c	2001/09/18 09:57:25	1.18
+++ libbfd.c	2001/09/20 16:56:16
@@ -1438,7 +1438,7 @@ _bfd_generic_verify_endian_match (ibfd, 
       else
 	msg = _("%s: compiled for a little endian system and target is big endian");
 
-      (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
+      (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
 
       bfd_set_error (bfd_error_wrong_format);
       return false;
Index: bfd/linker.c
===================================================================
RCS file: /cvs/src/src/bfd/linker.c,v
retrieving revision 1.16
diff -u -p -r1.16 linker.c
--- linker.c	2001/09/18 09:57:25	1.16
+++ linker.c	2001/09/20 16:56:19
@@ -1849,7 +1849,7 @@ _bfd_generic_link_add_one_symbol (info, 
 	      {
 		(*_bfd_error_handler)
 		  (_("%s: indirect symbol `%s' to `%s' is a loop"),
-		   bfd_get_filename (abfd), name, string);
+		   bfd_archive_filename (abfd), name, string);
 		bfd_set_error (bfd_error_invalid_operation);
 		return false;
 	      }
Index: bfd/merge.c
===================================================================
RCS file: /cvs/src/src/bfd/merge.c,v
retrieving revision 1.6
diff -u -p -r1.6 merge.c
--- merge.c	2001/09/19 05:33:12	1.6
+++ merge.c	2001/09/20 16:56:19
@@ -887,9 +887,11 @@ _bfd_merged_section_offset (output_bfd, 
   if (offset + addend >= sec->_raw_size)
     {
       if (offset + addend > sec->_raw_size)
-	(*_bfd_error_handler) (_("%s: access beyond end of merged section (%ld + %ld)"),
-			       bfd_get_filename (sec->owner), (long)offset,
-			       (long) addend);
+	{
+	  (*_bfd_error_handler)
+	    (_("%s: access beyond end of merged section (%ld + %ld)"),
+	     bfd_get_filename (sec->owner), (long) offset, (long) addend);
+	}
       return (secinfo->first ? sec->_cooked_size : 0);
     }
 
Index: bfd/pdp11.c
===================================================================
RCS file: /cvs/src/src/bfd/pdp11.c,v
retrieving revision 1.7
diff -u -p -r1.7 pdp11.c
--- pdp11.c	2001/09/19 05:33:12	1.7
+++ pdp11.c	2001/09/20 16:56:23
@@ -1667,7 +1667,7 @@ translate_to_native_sym_flags (abfd, cac
 	 file.  */
       (*_bfd_error_handler)
 	("%s: can not represent section for symbol `%s' in a.out object file format",
-	 bfd_get_filename (abfd),
+	 bfd_archive_filename (abfd),
 	 cache_ptr->name != NULL ? cache_ptr->name : "*unknown*");
       bfd_set_error (bfd_error_nonrepresentable_section);
       return false;
@@ -1695,7 +1695,7 @@ translate_to_native_sym_flags (abfd, cac
     {
       (*_bfd_error_handler)
 	("%s: can not represent section `%s' in a.out object file format",
-	 bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
+	 bfd_archive_filename (abfd), bfd_get_section_name (abfd, sec));
       bfd_set_error (bfd_error_nonrepresentable_section);
       return false;
     }
Index: bfd/pe-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/pe-mips.c,v
retrieving revision 1.7
diff -u -p -r1.7 pe-mips.c
--- pe-mips.c	2001/09/18 09:57:25	1.7
+++ pe-mips.c	2001/09/20 16:56:25
@@ -657,7 +657,7 @@ coff_pe_mips_relocate_section (output_bf
   {
     (*_bfd_error_handler) (_("\
 %s: `ld -r' not supported with PE MIPS objects\n"),
-			  bfd_get_filename (input_bfd));
+			   bfd_archive_filename (input_bfd));
     bfd_set_error (bfd_error_bad_value);
     return false;
   }
@@ -792,7 +792,7 @@ coff_pe_mips_relocate_section (output_bf
       */
 
 #define UI(x) (*_bfd_error_handler) (_("%s: unimplemented %s\n"), \
-				    bfd_get_filename (input_bfd), x); \
+				     bfd_archive_filename (input_bfd), x); \
 	      bfd_set_error (bfd_error_bad_value);
 
       switch (rel->r_type)
@@ -818,7 +818,7 @@ coff_pe_mips_relocate_section (output_bf
 	  if ((src & 0xf0000000) != (targ & 0xf0000000))
 	    {
 	      (*_bfd_error_handler) (_("%s: jump too far away\n"),
-				    bfd_get_filename (input_bfd));
+				     bfd_archive_filename (input_bfd));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
@@ -845,7 +845,7 @@ coff_pe_mips_relocate_section (output_bf
 	      break;
 	    default:
 	      (*_bfd_error_handler) (_("%s: bad pair/reflo after refhi\n"),
-				    bfd_get_filename (input_bfd));
+				     bfd_archive_filename (input_bfd));
 	      bfd_set_error (bfd_error_bad_value);
 	      return false;
 	    }
Index: bfd/peicode.h
===================================================================
RCS file: /cvs/src/src/bfd/peicode.h,v
retrieving revision 1.31
diff -u -p -r1.31 peicode.h
--- peicode.h	2001/09/18 09:57:26	1.31
+++ peicode.h	2001/09/20 16:56:26
@@ -783,12 +783,12 @@ pe_ILF_build_a_bfd (bfd *           abfd
     case IMPORT_CONST:
       /* XXX code yet to be written.  */
       _bfd_error_handler (_("%s: Unhandled import type; %x"),
-			  bfd_get_filename (abfd), import_type);
+			  bfd_archive_filename (abfd), import_type);
       return false;
 
     default:
       _bfd_error_handler (_("%s: Unrecognised import type; %x"),
-			  bfd_get_filename (abfd), import_type);
+			  bfd_archive_filename (abfd), import_type);
       return false;
     }
 
@@ -802,7 +802,7 @@ pe_ILF_build_a_bfd (bfd *           abfd
 
     default:
       _bfd_error_handler (_("%s: Unrecognised import name type; %x"),
-			  bfd_get_filename (abfd), import_name_type);
+			  bfd_archive_filename (abfd), import_name_type);
       return false;
     }
 
@@ -1160,7 +1160,7 @@ pe_ILF_object_p (bfd * abfd)
       _bfd_error_handler
 	(
 _("%s: Unrecognised machine type (0x%x) in Import Library Format archive"),
-         bfd_get_filename (abfd), machine);
+         bfd_archive_filename (abfd), machine);
       bfd_set_error (bfd_error_malformed_archive);
 
       return NULL;
@@ -1172,7 +1172,7 @@ _("%s: Unrecognised machine type (0x%x) 
       _bfd_error_handler
 	(
 _("%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"),
-	 bfd_get_filename (abfd), machine);
+	 bfd_archive_filename (abfd), machine);
       bfd_set_error (bfd_error_wrong_format);
 
       return NULL;
@@ -1189,7 +1189,7 @@ _("%s: Recognised but unhandled machine 
     {
       _bfd_error_handler
 	(_("%s: size field is zero in Import Library Format header"),
-	 bfd_get_filename (abfd));
+	 bfd_archive_filename (abfd));
       bfd_set_error (bfd_error_malformed_archive);
 
       return NULL;
@@ -1217,7 +1217,7 @@ _("%s: Recognised but unhandled machine 
     {
       _bfd_error_handler
 	(_("%s: string not null terminated in ILF object file."),
-	 bfd_get_filename (abfd));
+	 bfd_archive_filename (abfd));
       bfd_set_error (bfd_error_malformed_archive);
 
       return NULL;
Index: bfd/srec.c
===================================================================
RCS file: /cvs/src/src/bfd/srec.c,v
retrieving revision 1.13
diff -u -p -r1.13 srec.c
--- srec.c	2001/09/19 05:33:13	1.13
+++ srec.c	2001/09/20 16:56:26
@@ -300,7 +300,7 @@ srec_bad_byte (abfd, lineno, c, error)
 	}
       (*_bfd_error_handler)
 	(_("%s:%d: Unexpected character `%s' in S-record file\n"),
-	 bfd_get_filename (abfd), lineno, buf);
+	 bfd_archive_filename (abfd), lineno, buf);
       bfd_set_error (bfd_error_bad_value);
     }
 }
Index: bfd/xcofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/xcofflink.c,v
retrieving revision 1.14
diff -u -p -r1.14 xcofflink.c
--- xcofflink.c	2001/09/18 09:57:26	1.14
+++ xcofflink.c	2001/09/20 16:56:31
@@ -1239,7 +1239,7 @@ xcoff_link_add_symbols (abfd, info)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: `%s' has line numbers but no enclosing section"),
-		     bfd_get_filename (abfd), name);
+		     bfd_archive_filename (abfd), name);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -1292,7 +1292,7 @@ xcoff_link_add_symbols (abfd, info)
 	{
 	  (*_bfd_error_handler)
 	    (_("%s: class %d symbol `%s' has no aux entries"),
-	     bfd_get_filename (abfd), sym.n_sclass, name);
+	     bfd_archive_filename (abfd), sym.n_sclass, name);
 	  bfd_set_error (bfd_error_bad_value);
 	  goto error_return;
 	}
@@ -1315,7 +1315,7 @@ xcoff_link_add_symbols (abfd, info)
 	default:
 	  (*_bfd_error_handler)
 	    (_("%s: symbol `%s' has unrecognized csect type %d"),
-	     bfd_get_filename (abfd), name, smtyp);
+	     bfd_archive_filename (abfd), name, smtyp);
 	  bfd_set_error (bfd_error_bad_value);
 	  goto error_return;
 
@@ -1327,7 +1327,7 @@ xcoff_link_add_symbols (abfd, info)
 	    {
 	      (*_bfd_error_handler)
 		(_("%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
-		 bfd_get_filename (abfd), name, sym.n_sclass, sym.n_scnum,
+		 bfd_archive_filename (abfd), name, sym.n_sclass, sym.n_scnum,
 		 aux.x_csect.x_scnlen.l);
 	      bfd_set_error (bfd_error_bad_value);
 	      goto error_return;
@@ -1363,7 +1363,7 @@ xcoff_link_add_symbols (abfd, info)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: XMC_TC0 symbol `%s' is class %d scnlen %d"),
-		     bfd_get_filename (abfd), name, sym.n_sclass,
+		     bfd_archive_filename (abfd), name, sym.n_sclass,
 		     aux.x_csect.x_scnlen.l);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
@@ -1515,7 +1515,7 @@ xcoff_link_add_symbols (abfd, info)
 	      {
 		(*_bfd_error_handler)
 		  (_("%s: csect `%s' not in enclosing section"),
-		   bfd_get_filename (abfd), name);
+		   bfd_archive_filename (abfd), name);
 		bfd_set_error (bfd_error_bad_value);
 		goto error_return;
 	      }
@@ -1622,7 +1622,7 @@ xcoff_link_add_symbols (abfd, info)
 	      {
 		(*_bfd_error_handler)
 		  (_("%s: misplaced XTY_LD `%s'"),
-		   bfd_get_filename (abfd), name);
+		   bfd_archive_filename (abfd), name);
 		bfd_set_error (bfd_error_bad_value);
 		goto error_return;
 	      }
@@ -1946,7 +1946,7 @@ xcoff_link_add_symbols (abfd, info)
 		{
 		  (*_bfd_error_handler)
 		    (_("%s: reloc %s:%d not in csect"),
-		     bfd_get_filename (abfd), o->name, i);
+		     bfd_archive_filename (abfd), o->name, i);
 		  bfd_set_error (bfd_error_bad_value);
 		  goto error_return;
 		}
@@ -5259,7 +5259,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
 			{
 			  (*_bfd_error_handler)
 			    (_("%s: loader reloc in unrecognized section `%s'"),
-			     bfd_get_filename (input_bfd),
+			     bfd_archive_filename (input_bfd),
 			     sec->name);
 			  bfd_set_error (bfd_error_nonrepresentable_section);
 			  return false;
@@ -5281,7 +5281,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
 			{
 			  (*_bfd_error_handler)
 			    (_("%s: `%s' in loader reloc but not loader sym"),
-			     bfd_get_filename (input_bfd),
+			     bfd_archive_filename (input_bfd),
 			     h->root.root.string);
 			  bfd_set_error (bfd_error_bad_value);
 			  return false;
@@ -5296,7 +5296,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
 		    {
 		      (*_bfd_error_handler)
 			(_("%s: loader reloc in read-only section %s"),
-			 bfd_get_filename (input_bfd),
+			 bfd_archive_filename (input_bfd),
 			 bfd_get_section_name (finfo->output_bfd,
 					       o->output_section));
 		      bfd_set_error (bfd_error_invalid_operation);



More information about the Binutils mailing list