Hardcode host-specific name for LTO plugin
[platform/upstream/binutils.git] / bfd / plugin.c
index a068861..f30eade 100644 (file)
@@ -295,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);