This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Feb 2015 05:56:12 -0800
- Subject: Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file
- Authentication-results: sourceware.org; auth=none
- References: <20150128181242 dot GA4350 at intel dot com> <DC893389-7AE0-45DA-A65B-124426D91CF3 at gmail dot com> <CAMe9rOqxNUzhanCShsgfLsqj_QJibroQZrF+g4y8c=XQxZnd8A at mail dot gmail dot com> <CAMe9rOpMWxMRHfmS=9kio+V5XAjEMFfnHo3xDPg5wegVXdj9MQ at mail dot gmail dot com> <CAMe9rOo=rBfa9rXANJy4raHn1bKKsVp75MmhxTA-fJdEdfi9yA at mail dot gmail dot com> <CAMe9rOpT6-1rcnW7g+TB0Sy-aZY+KPDyfo=jKS=ers9YkqDm4A at mail dot gmail dot com> <20150206125601 dot GA337 at x4> <CAMe9rOo6=MykDsmNry-BKcQ-9T-g0N_dG65wUdEJa0w3Q26d8w at mail dot gmail dot com> <20150206131857 dot GB337 at x4> <CAMe9rOqR4SCb24dcQXFcF-gC3SNc+sBw-cSR=J2BFP_6cHYKAQ at mail dot gmail dot com>
On Fri, Feb 6, 2015 at 5:30 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Feb 6, 2015 at 5:18 AM, Markus Trippelsdorf
> <markus@trippelsdorf.de> wrote:
>> On 2015.02.06 at 05:10 -0800, H.J. Lu wrote:
>>> On Fri, Feb 6, 2015 at 4:56 AM, Markus Trippelsdorf
>>> <markus@trippelsdorf.de> wrote:
>>> > On 2015.02.05 at 12:57 -0800, H.J. Lu wrote:
>>> >>
>>> >> We should pass handle, not file, to release_input_file.
>>> >> I checked it in as an obvious fix.
>>> >
>>> > This commit causes:
>>> >
>>> > % echo "int main () {}" | gcc -fuse-ld=gold -flto -x c++ -
>>> > ld.gold: internal error in remove_writer, at token.h:132
>>> > collect2: error: ld returned 1 exit status
>>> >
>>>
>>> ld.bfd closes fd without release_input_file being called
>>> and ld.gold leaks file descriptors if release_input_file
>>> isn't called. We can either fix gold:
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=17896
>>>
>>> or revert the PR lto/64837 fix.
>>
>> Given that LTO would be completely broken with any gold version in
>> gcc-5, a revert seems to be the only viable option.
>>
>
> Fine with me and reopen PR lto/64837.
>
Done with r220477.
--
H.J.