diff options
Diffstat (limited to 'binutils-2.25/binutils/nm.c')
-rw-r--r-- | binutils-2.25/binutils/nm.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/binutils-2.25/binutils/nm.c b/binutils-2.25/binutils/nm.c index 5c325201..ecd147e0 100644 --- a/binutils-2.25/binutils/nm.c +++ b/binutils-2.25/binutils/nm.c @@ -1,7 +1,5 @@ /* nm.c -- Describe symbol table of a rel file. - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -177,7 +175,11 @@ static char other_format[] = "%02x"; static char desc_format[] = "%04x"; static char *target = NULL; -static char *plugin_target = NULL; +#if BFD_SUPPORTS_PLUGINS +static const char *plugin_target = "plugin"; +#else +static const char *plugin_target = NULL; +#endif /* Used to cache the line numbers for a BFD. */ static bfd *lineno_cache_bfd; @@ -432,6 +434,10 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms, if (sym == NULL) bfd_fatal (bfd_get_filename (abfd)); + if (strcmp (sym->name, "__gnu_lto_slim") == 0) + non_fatal (_("%s: plugin needed to handle lto object"), + bfd_get_filename (abfd)); + if (undefined_only) keep = bfd_is_und_section (sym->section); else if (external_only) @@ -1010,7 +1016,15 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size); if (symcount < 0) - bfd_fatal (bfd_get_filename (abfd)); + { + if (dynamic && bfd_get_error () == bfd_error_no_symbols) + { + non_fatal (_("%s: no symbols"), bfd_get_filename (abfd)); + return; + } + + bfd_fatal (bfd_get_filename (abfd)); + } if (symcount == 0) { @@ -1640,7 +1654,6 @@ main (int argc, char **argv) case OPTION_PLUGIN: /* --plugin */ #if BFD_SUPPORTS_PLUGINS - plugin_target = "plugin"; bfd_plugin_set_plugin (optarg); #else fatal (_("sorry - this program has been built without plugin support\n")); |