Updated translation
[deliverable/binutils-gdb.git] / binutils / nm.c
index 06d99af82dd65589f4bc78b52898e6ef63c1a65d..4f558c1f26ce49a61eb9607e538234b5305e97c8 100644 (file)
@@ -1,6 +1,6 @@
 /* nm.c -- Describe symbol table of a rel file.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002
+   2001, 2002, 2003
    Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
@@ -288,7 +288,8 @@ usage (stream, status)
   -B                     Same as --format=bsd\n\
   -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\
                           The STYLE, if specified, can be `auto' (the default),\n\
-                          `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-v3'\n\
+                          `gnu', `lucid', `arm', `hp', `edg', `gnu-v3', `java'\n\
+                          or `gnat'\n\
       --no-demangle      Do not demangle low-level symbol names\n\
   -D, --dynamic          Display dynamic symbols instead of normal symbols\n\
       --defined-only     Display only defined symbols\n\
@@ -508,6 +509,13 @@ main (argc, argv)
   if (show_version)
     print_version ("nm");
 
+  if (sort_by_size && undefined_only)
+    {
+      non_fatal (_("Using the --size-sort and --undefined-only options together"));
+      non_fatal (_("will produce no output, since undefined symbols have no size."));
+      return 0;
+    }
+
   /* OK, all options now parsed.  If no filename specified, do a.out.  */
   if (optind == argc)
     return !display_file ("a.out");
@@ -1213,29 +1221,21 @@ print_symbol (abfd, sym, ssize, archive_bfd)
      bfd_vma ssize;
      bfd *archive_bfd;
 {
+  symbol_info syminfo;
+  struct extended_symbol_info info;
+   
   PROGRESS (1);
 
   (*format->print_symbol_filename) (archive_bfd, abfd);
 
-  if (undefined_only)
-    {
-      if (bfd_is_und_section (bfd_get_section (sym)))
-       print_symname ("%s", bfd_asymbol_name (sym), abfd);
-    }
+  bfd_get_symbol_info (abfd, sym, &syminfo);
+  info.sinfo = &syminfo;
+  info.ssize = ssize;
+  if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+    info.elfinfo = (elf_symbol_type *) sym;
   else
-    {
-      symbol_info syminfo;
-      struct extended_symbol_info info;
-
-      bfd_get_symbol_info (abfd, sym, &syminfo);
-      info.sinfo = &syminfo;
-      info.ssize = ssize;
-      if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
-       info.elfinfo = (elf_symbol_type *) sym;
-      else
-       info.elfinfo = NULL;
-      (*format->print_symbol_info) (&info, abfd);
-    }
+    info.elfinfo = NULL;
+  (*format->print_symbol_info) (&info, abfd);
 
   if (line_numbers)
     {
@@ -1584,9 +1584,9 @@ print_symbol_info_sysv (info, abfd)
   if (SYM_TYPE (info) == '-')
     {
       /* A stab.  */
-      printf ("%18s|  ", SYM_STAB_NAME (info));                /* (C) Type */
-      printf (desc_format, SYM_STAB_DESC (info));      /* Size */
-      printf ("|     |");                              /* Line, Section */
+      printf ("%18s|  ", SYM_STAB_NAME (info));                /* (C) Type */
+      printf (desc_format, SYM_STAB_DESC (info));      /* Size */
+      printf ("|     |");                              /* Line, Section */
     }
   else
     {
This page took 0.023394 seconds and 4 git commands to generate.