]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/ldfile.c
Stop the linker's --dependency-file option from including temporary lto files.
[thirdparty/binutils-gdb.git] / ld / ldfile.c
index 4976367bbf03b09df6e5625a676acb309e1f30ea..c8a6874978b3653143dc81b40d02028d6c27433d 100644 (file)
@@ -352,7 +352,9 @@ ldfile_try_open_bfd (const char *attempt,
       return false;
     }
 
-  track_dependency_files (attempt);
+  /* PR 30568: Do not track lto generated temporary object files.  */
+  if (!entry->flags.lto_output)
+    track_dependency_files (attempt);
 
   /* Linker needs to decompress sections.  */
   entry->the_bfd->flags |= BFD_DECOMPRESS;