aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorMarkus Trippelsdorf <markus@trippelsdorf.de>2014-04-03 11:33:17 +0100
committerNick Clifton <nickc@redhat.com>2014-04-03 11:33:17 +0100
commit92b1b67865c719e83d12578e584ca5e20d172eac (patch)
treee8d46fd9b5c907240e9dc5a95dbc66d99235fa1b /binutils/nm.c
parent965b60c9460bb63c3c6fbb749b6a2deb541f422f (diff)
downloadgdb-92b1b67865c719e83d12578e584ca5e20d172eac.zip
gdb-92b1b67865c719e83d12578e584ca5e20d172eac.tar.gz
gdb-92b1b67865c719e83d12578e584ca5e20d172eac.tar.bz2
This patch allows one to place the gcc's liblto_plugin in the lib/bfd-plugins directory
and have it loaded by default (as long as the --target option isn't used). PR binutils/14698 ar.c: Set plugin_target early if plugins are supported. nm.c: Likewise.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index 15c48a3..2a44a84 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -175,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;
@@ -1646,7 +1650,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"));