Fix encoding or OpenRisk1000 PC relative relocations.
[deliverable/binutils-gdb.git] / ld / ldfile.c
index 05889f2e6c1de3abb04c690a7ecee70be5f32187..d4f7cb43a0bdddcd2290b8d2bee048371d5029d7 100644 (file)
@@ -142,6 +142,14 @@ ldfile_try_open_bfd (const char *attempt,
   /* Linker needs to decompress sections.  */
   entry->the_bfd->flags |= BFD_DECOMPRESS;
 
+  /* This is a linker input BFD.  */
+  entry->the_bfd->is_linker_input = 1;
+
+#ifdef ENABLE_PLUGINS
+  if (entry->flags.lto_output)
+    entry->the_bfd->lto_output = 1;
+#endif
+
   /* If we are searching for this file, see if the architecture is
      compatible with the output file.  If it isn't, keep searching.
      If we can't open the file as an object file, stop the search
@@ -301,9 +309,9 @@ success:
      bfd_object that it sets the bfd's arch and mach, which
      will be needed when and if we want to bfd_create a new
      one using this one as a template.  */
-  if (bfd_check_format (entry->the_bfd, bfd_object)
-      && link_info.lto_plugin_active
-      && !no_more_claiming)
+  if (link_info.lto_plugin_active
+      && !no_more_claiming
+      && bfd_check_format (entry->the_bfd, bfd_object))
     plugin_maybe_claim (entry);
 #endif /* ENABLE_PLUGINS */
 
This page took 0.024055 seconds and 4 git commands to generate.