aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Avila de Espindola <espindola@google.com>2009-10-30 18:29:37 +0000
committerRafael Espindola <espindola@gcc.gnu.org>2009-10-30 18:29:37 +0000
commit86ed04df82ed7360221e421d691aced1efbedb90 (patch)
tree68d0b283fd822d6c677e932f928eaec36a8b35f9
parentf6d08b433b7347c53d1d42b36f3806258705e37e (diff)
downloadgcc-86ed04df82ed7360221e421d691aced1efbedb90.zip
gcc-86ed04df82ed7360221e421d691aced1efbedb90.tar.gz
gcc-86ed04df82ed7360221e421d691aced1efbedb90.tar.bz2
re PR lto/41871 (lto-plugin gives: could not open/create temporary file)
2009-10-30 Rafael Avila de Espindola <espindola@google.com> PR41871 * lto-plugin.c (claim_file_handler): Close files that we created. From-SVN: r153764
-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 fd2d716..3342979 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 3a51441..c92ac06 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;
}