+2003-03-04 Nick Clifton <nickc@redhat.com>
+
+ * nm.c (main): Print a warning message if --size-sort and
+ --undefined-only are used together.
+
+2003-03-04 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * nm.c (print_symbol): Remove check for undefined_only.
+
2003-03-03 Nick Clifton <nickc@redhat.com>
* po/da.po: Installed latest translation.
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");
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)
{
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
{