+2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/25584
+ * plugin.c (need_lto_wrapper_p): New.
+ (bfd_plugin_set_program_name): Add an int argument to set
+ need_lto_wrapper_p.
+ (get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
+ set.
+ * plugin.h (bfd_plugin_set_program_name): Add an int argument.
+
2020-02-24 Alan Modra <amodra@gmail.com>
* vms-lib.c (_bfd_vms_lib_archive_p): Correct overflow checks.
bfd_boolean initialized;
};
+static const char *plugin_program_name;
+static int need_lto_wrapper_p;
+
+void
+bfd_plugin_set_program_name (const char *program_name,
+ int need_lto_wrapper)
+{
+ plugin_program_name = program_name;
+ need_lto_wrapper_p = need_lto_wrapper;
+}
+
/* Use GCC LTO wrapper to covert LTO IR object to the real object. */
static bfd_boolean
char dir_seperator = '\0';
char *resolution_file;
+ if (!need_lto_wrapper_p)
+ return FALSE;
+
if (plugin->initialized)
{
if (plugin->lto_wrapper)
return LDPS_OK;
}
-static const char *plugin_program_name;
-
-void
-bfd_plugin_set_program_name (const char *program_name)
-{
- plugin_program_name = program_name;
-}
-
int
bfd_plugin_open_input (bfd *ibfd, struct ld_plugin_input_file *file)
{
#ifndef _PLUGIN_H_
#define _PLUGIN_H_
-void bfd_plugin_set_program_name (const char *);
+void bfd_plugin_set_program_name (const char *, int);
int bfd_plugin_open_input (bfd *, struct ld_plugin_input_file *);
void bfd_plugin_set_plugin (const char *);
bfd_boolean bfd_plugin_target_p (const bfd_target *);
+2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/25584
+ * ar.c (main): Pass 0 to bfd_plugin_set_program_name.
+ * nm.c (main): Pass 1 to bfd_plugin_set_program_name.
+
2020-02-24 Nick Clifton <nickc@redhat.com>
PR 25499
xmalloc_set_program_name (program_name);
bfd_set_error_program_name (program_name);
#if BFD_SUPPORTS_PLUGINS
- bfd_plugin_set_program_name (program_name);
+ bfd_plugin_set_program_name (program_name, 0);
#endif
expandargv (&argc, &argv);
xmalloc_set_program_name (program_name);
bfd_set_error_program_name (program_name);
#if BFD_SUPPORTS_PLUGINS
- bfd_plugin_set_program_name (program_name);
+ bfd_plugin_set_program_name (program_name, 1);
#endif
START_PROGRESS (program_name, 0);