2001-08-31 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 31 Aug 2001 21:41:10 +0000 (21:41 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 31 Aug 2001 21:41:10 +0000 (21:41 +0000)
* elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
with bad relocation.

bfd/ChangeLog
bfd/elf32-mips.c

index 8fe425034b479c70ee0ef746f3615cb85ac84ed7..25083b1a7fe8d74aa5619257536c17881f6834a3 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-31  H.J. Lu  <hjl@gnu.org>
+
+       * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
+       with bad relocation.
+
 2001-08-31  Eric Christopher  <echristo@redhat.com>
            Jason Eckhardt  <jle@redhat.com>
 
index a1d7205b9868881be3032e0aaefebee469a56aec..9ba61f0be6fe14cfbce0228542acddd27224c158 100644 (file)
@@ -7724,8 +7724,15 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
        h = NULL;
       else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
        {
-         (*_bfd_error_handler)
-           (_("Malformed reloc detected for section %s"), name);
+         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_set_error (bfd_error_bad_value);
          return false;
        }