On Wed, Feb 4, 2015 at 7:35 AM, Cary Coutant <ccout...@google.com> wrote:
>>>If you're going to insist on calling the release_input_file API from
>>>the claim_file handler, I'm going to have to fix gold to ignore the
>>>call to avoid a premature unlock of the object file.
>>
>> What's the proper solution for not leaking those filedescriptors?
>
> There was a bug in gold where it wasn't unlocking external members of
> thin archives that got claimed by the plugin. See PR 15660:
>
>    https://sourceware.org/bugzilla/show_bug.cgi?id=15660
>

FWIW, ld doesn't have the file descriptor leak since it does

  /* fd belongs to us, not the plugin; but we don't need it.  */
  close (file->fd);

after calling claim_file_handler.  It only works with GCC plug-in
library.  I going to change it:

https://sourceware.org/ml/binutils/2015-02/msg00001.html


-- 
H.J.

Reply via email to