+2010-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/12088
+ * nm.c (plugin_target): New.
+ (main): Set plugin_target to "plugin" for --plugin.
+ (display_file): Pass plugin_target to bfd_openr if target
+ isn't set.
+
2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
static char desc_format[] = "%04x";
static char *target = NULL;
+static char *plugin_target = NULL;
/* Used to cache the line numbers for a BFD. */
static bfd *lineno_cache_bfd;
if (get_file_size (filename) < 1)
return FALSE;
- file = bfd_openr (filename, target);
+ file = bfd_openr (filename, target ? target : plugin_target);
if (file == NULL)
{
bfd_nonfatal (filename);
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"));