aboutsummaryrefslogtreecommitdiff
path: root/ld/ldfile.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-06-28 13:49:43 +0100
committerNick Clifton <nickc@redhat.com>2023-06-28 13:49:43 +0100
commitb25c1a15cbac78e592d7a0c749dec2fcc175ec39 (patch)
treed92b6a3439c641a721cfd9d92b5bb46071ced911 /ld/ldfile.c
parent8527c3669487c255ecbeae6ffa0a7aff3dcb6920 (diff)
downloadgdb-b25c1a15cbac78e592d7a0c749dec2fcc175ec39.zip
gdb-b25c1a15cbac78e592d7a0c749dec2fcc175ec39.tar.gz
gdb-b25c1a15cbac78e592d7a0c749dec2fcc175ec39.tar.bz2
Stop the linker's --dependency-file option from including temporary lto files.
PR 30568 * ldfile.c (ldfile_try_open_bfd): Do not track lto generated temporary files.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r--ld/ldfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c
index 4976367..c8a6874 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -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;