On Wed, Jan 28, 2015 at 11:37 AM, H.J. Lu <hjl.to...@gmail.com> wrote:
> On Wed, Jan 28, 2015 at 11:19 AM, Richard Biener
> <richard.guent...@gmail.com> wrote:
>> On January 28, 2015 7:12:43 PM CET, "H.J. Lu" <hongjiu...@intel.com> wrote:
>>>Hi,
>>>
>>>This patch makes claim_file_handler to call release_input_file after it
>>>finishes processing input file.  OK for trunk?
>>
>> OK.  How did you test this?
>
> I did normal bootstrap and "make check" on Linux/x86-64.
> I also run ld.bfd and ld.gold by hand to verify that release_input_file
> is called.
>

This is needed for LTO build.  ar/nm/ranlib don't provide
release_input_file.  I checked it in as an obvious fix.

-- 
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 220212)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
 2015-01-28  H.J. Lu  <hongjiu...@intel.com>

+ * lto-plugin.c (claim_file_handler): Call release_input_file only
+ if it is not NULL.
+
+2015-01-28  H.J. Lu  <hongjiu...@intel.com>
+
  PR lto/64837
  * lto-plugin.c (release_input_file): New.
  (claim_file_handler): Call release_input_file.
Index: lto-plugin.c
===================================================================
--- lto-plugin.c (revision 220212)
+++ lto-plugin.c (working copy)
@@ -1007,7 +1007,8 @@ claim_file_handler (const struct ld_plug
   if (obj.objfile)
     simple_object_release_read (obj.objfile);

-  release_input_file (file);
+  if (release_input_file)
+    release_input_file (file);

   return LDPS_OK;
 }

Reply via email to