aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-05-28 11:30:49 +0000
committerNick Clifton <nickc@redhat.com>2009-05-28 11:30:49 +0000
commitfc579192b43d249de3661894c154342a6c7ebad2 (patch)
tree0ac1a2b40977a47e2e75d9faf678a36020e0bb45 /bfd
parent5dff79d83d209d48f13ad385ae8dc3e690bf9295 (diff)
downloadgdb-fc579192b43d249de3661894c154342a6c7ebad2.zip
gdb-fc579192b43d249de3661894c154342a6c7ebad2.tar.gz
gdb-fc579192b43d249de3661894c154342a6c7ebad2.tar.bz2
2009-05-28 Nick Clifton <nickc@redhat.com>
* targets.c (_bfd_target_vector): Only include plugin target in all-targets build if BFD_SUPPORTS_PLUGINS is non-zero. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * plugin.c (program_name): Remove. (plugin_program_name): New. (bfd_plugin_set_program_name): New. (try_load_plugin): Use plugin_program_name. * plugin.h (bfd_plugin_set_program_name): New. 2009-05-27 Rafael Avila de Espindola <espindola@google.com> * ar.c (main): Call bfd_plugin_set_program_name. * nm.c (main): Call bfd_plugin_set_program_name.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog15
-rw-r--r--bfd/plugin.c12
-rw-r--r--bfd/plugin.h1
-rw-r--r--bfd/targets.c2
4 files changed, 26 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7ae22bb..774dc3f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-28 Nick Clifton <nickc@redhat.com>
+
+ * targets.c (_bfd_target_vector): Only include plugin target in
+ all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
+
2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (struct call_info): New member broken_cycle.
@@ -17,7 +22,15 @@
(spu_elf_auto_overlay): Honor call counts when determining number
of stubs required in software i-cache mode.
-2009-05-26 Rafael Avila de Espindola <espindola@google.com>
+2009-05-27 Rafael Avila de Espindola <espindola@google.com>
+
+ * plugin.c (program_name): Remove.
+ (plugin_program_name): New.
+ (bfd_plugin_set_program_name): New.
+ (try_load_plugin): Use plugin_program_name.
+ * plugin.h (bfd_plugin_set_program_name): New.
+
+2009-05-27 Rafael Avila de Espindola <espindola@google.com>
* aclocal.m4: Include ../config/plugins.m4.
* configure.in: Use AC_PLUGINS.
diff --git a/bfd/plugin.c b/bfd/plugin.c
index 49395e8..ca47ab6 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -106,7 +106,13 @@ add_symbols (void * handle,
return LDPS_OK;
}
-extern char *program_name __attribute__ ((weak));
+static const char *plugin_program_name;
+
+void
+bfd_plugin_set_program_name (const char *program_name)
+{
+ plugin_program_name = program_name;
+}
static int
try_load_plugin (const char *pname)
@@ -180,11 +186,11 @@ load_plugin (void)
if (plugin_name)
return try_load_plugin (plugin_name);
- if (!program_name)
+ if (plugin_program_name == NULL)
return 0;
plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL);
- p = make_relative_prefix (program_name,
+ p = make_relative_prefix (plugin_program_name,
BINDIR,
plugin_dir);
free (plugin_dir);
diff --git a/bfd/plugin.h b/bfd/plugin.h
index 2fae2de..3091f97 100644
--- a/bfd/plugin.h
+++ b/bfd/plugin.h
@@ -23,6 +23,7 @@
#include "bfd.h"
+void bfd_plugin_set_program_name (const char *);
void bfd_plugin_set_plugin (const char *);
typedef struct plugin_data_struct
diff --git a/bfd/targets.c b/bfd/targets.c
index 6ec6a6c..49aa5f1 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -1145,7 +1145,9 @@ static const bfd_target * const _bfd_target_vector[] =
&pdp11_aout_vec,
&pef_vec,
&pef_xlib_vec,
+#if BFD_SUPPORTS_PLUGINS
&plugin_vec,
+#endif
#if 0
/* This has the same magic number as RS/6000. */
&pmac_xcoff_vec,