summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-03 09:42:33 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-11-03 09:42:33 +0000
commita3b5283dca7b7aac3a7f37b3853191963dbd0568 (patch)
tree7ca891659841fbbc00e9b95dc135859ce7fe497c /lto-plugin
parent1d1a6366aa7467422ba74d6b6cca15855a26d4ca (diff)
downloadgcc-a3b5283dca7b7aac3a7f37b3853191963dbd0568.tar.gz
2009-11-03 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 153838 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@153842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog5
-rw-r--r--lto-plugin/lto-plugin.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index fd2d7169966..3342979bc6e 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-30 Rafael Avila de Espindola <espindola@google.com>
+
+ PR41871
+ * lto-plugin.c (claim_file_handler): Close files that we created.
+
2009-10-28 Rafael Avila de Espindola <espindola@google.com>
* lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 3a51441c433..c92ac06cf2d 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -635,6 +635,9 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
if (elf)
elf_end (elf);
+ if (file->offset != 0)
+ close (lto_file_fd);
+
return LDPS_OK;
}