Hardcode host-specific name for LTO plugin
[platform/upstream/binutils.git] / bfd / plugin.c
index d336b67..f30eade 100644 (file)
@@ -83,6 +83,7 @@ dlerror (void)
 #define bfd_plugin_bfd_is_target_special_symbol       ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 #define bfd_plugin_get_lineno                         _bfd_nosymbols_get_lineno
 #define bfd_plugin_find_nearest_line                  _bfd_nosymbols_find_nearest_line
+#define bfd_plugin_find_line                          _bfd_nosymbols_find_line
 #define bfd_plugin_find_inliner_info                  _bfd_nosymbols_find_inliner_info
 #define bfd_plugin_bfd_make_debug_symbol              _bfd_nosymbols_bfd_make_debug_symbol
 #define bfd_plugin_read_minisymbols                   _bfd_generic_read_minisymbols
@@ -294,6 +295,14 @@ load_plugin (bfd *abfd)
       char *full_name;
       struct stat s;
 
+#ifdef BFD_PLUGIN_LTO_NAME
+#define STRINGIFY(x) STRINGIFY_(x)
+#define STRINGIFY_(x) #x
+      if (strcmp(ent->d_name, STRINGIFY(BFD_PLUGIN_LTO_NAME))) {
+        continue;
+      }
+#endif
+
       full_name = concat (p, "/", ent->d_name, NULL);
       if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode))
        found = try_load_plugin (full_name, abfd);