]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* nm.c (display_rel_file): Don't report "no symbols" as an error.
authorAlan Modra <amodra@gmail.com>
Mon, 26 Aug 2002 10:14:15 +0000 (10:14 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 26 Aug 2002 10:14:15 +0000 (10:14 +0000)
* objdump.c (slurp_symtab): Likewise.
(slurp_dynamic_symtab): Likewise.
(dump_symbols): Likewise.  Do print "no symbols" to stdout.

binutils/ChangeLog
binutils/nm.c
binutils/objdump.c

index 928f27840f980d558de8280e6943db547334b7fa..8d844655a3deebbb9ba680ba57d09bed5a5b8f02 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-26  Alan Modra  <amodra@bigpond.net.au>
+
+       * nm.c (display_rel_file): Don't report "no symbols" as an error.
+       * objdump.c (slurp_symtab): Likewise.
+       (slurp_dynamic_symtab): Likewise.
+       (dump_symbols): Likewise.  Do print "no symbols" to stdout.
+
 2002-08-24  Geoffrey Keating  <geoffk@redhat.com>
 
        * MAINTAINERS: Change my mailing address.
index 62bc2b46198e20b48f96e7fe9cc0f4b6f94fda84..c3f2729b749f546752feb7521ea5614a61fc4d2d 100644 (file)
@@ -955,10 +955,7 @@ display_rel_file (abfd, archive_bfd)
   if (! dynamic)
     {
       if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
-       {
-         non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
-         return;
-       }
+       return;
     }
 
   symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
@@ -966,10 +963,7 @@ display_rel_file (abfd, archive_bfd)
     bfd_fatal (bfd_get_filename (abfd));
 
   if (symcount == 0)
-    {
-      non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
-      return;
-    }
+    return;
 
   /* Discard the symbols we don't want to print.
      It's OK to do this in place; we'll free the storage anyway
index ff1778e7370062e77c44b4133e104298fda1e614..21acc8b8137e69671466217993f15b14f4e1d9c1 100644 (file)
@@ -383,7 +383,6 @@ slurp_symtab (abfd)
 
   if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
     {
-      non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
       symcount = 0;
       return NULL;
     }
@@ -397,8 +396,6 @@ slurp_symtab (abfd)
   symcount = bfd_canonicalize_symtab (abfd, sy);
   if (symcount < 0)
     bfd_fatal (bfd_get_filename (abfd));
-  if (symcount == 0)
-    non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
   return sy;
 }
 
@@ -429,8 +426,6 @@ slurp_dynamic_symtab (abfd)
   dynsymcount = bfd_canonicalize_dynamic_symtab (abfd, sy);
   if (dynsymcount < 0)
     bfd_fatal (bfd_get_filename (abfd));
-  if (dynsymcount == 0)
-    non_fatal (_("%s: No dynamic symbols"), bfd_get_filename (abfd));
   return sy;
 }
 
@@ -2284,19 +2279,18 @@ dump_symbols (abfd, dynamic)
     {
       current = dynsyms;
       max = dynsymcount;
-      if (max == 0)
-       return;
       printf ("DYNAMIC SYMBOL TABLE:\n");
     }
   else
     {
       current = syms;
       max = symcount;
-      if (max == 0)
-       return;
       printf ("SYMBOL TABLE:\n");
     }
 
+  if (max == 0)
+    printf (_("no symbols\n"));
+
   for (count = 0; count < max; count++)
     {
       if (*current)