From patchwork Wed Jan 28 18:12:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 433908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2CC9714021A for ; Thu, 29 Jan 2015 05:13:27 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=VV+RLB3PjvUz24CQ0qkV0qQx3IEFdnX72Umqk6SUtHV Tk/IvDKUNaCbvHeTa2iw4eGRW2KkYMXLfAYqAooST4V3ZvyS3M0NjUYgM2GbguC8 fP0mwGcVAkKcHWX6hqEfIsowuJSlrCAmvDqDAB1ngg/yqUjJJbeIfmApK/yxKgvk = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=eRUGZyRZz8KZ/mzj71sKI+3/EIY=; b=polfj3tJTJBjoXNsJ YUZGGhR5HwErlY9Ga2IndIC/ITUxDK4xfsArRcULu5QNRpIMzF61nyob/Nqxdqfo nAkPgPyc+1D7HsPuKL+XISI8t4aMbuqTZELVodpY+hONiyKDfwop/Oj02pK7djcp bSKpLvqvinxal85hnMsMrxahiw= Received: (qmail 18597 invoked by alias); 28 Jan 2015 18:12:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 18584 invoked by uid 89); 28 Jan 2015 18:12:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga03.intel.com Received: from mga03.intel.com (HELO mga03.intel.com) (134.134.136.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Jan 2015 18:12:53 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 28 Jan 2015 10:08:23 -0800 X-ExtLoop1: 1 Received: from gnu-mic-2.sc.intel.com ([172.25.70.156]) by orsmga001.jf.intel.com with ESMTP; 28 Jan 2015 10:12:44 -0800 Received: by gnu-mic-2.sc.intel.com (Postfix, from userid 1000) id 4D70A2401F7; Wed, 28 Jan 2015 10:12:43 -0800 (PST) Date: Wed, 28 Jan 2015 10:12:43 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file Message-ID: <20150128181242.GA4350@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hi, This patch makes claim_file_handler to call release_input_file after it finishes processing input file. OK for trunk? Thanks. H.J. diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index e8ec05b..c0eae24 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,10 @@ +2015-01-28 H.J. Lu + + PR lto/64837 + * lto-plugin.c (release_input_file): New. + (claim_file_handler): Call release_input_file. + (onload): Set release_input_file. + 2014-12-09 Ilya Verbin * lto-plugin.c (offload_files, num_offload_files): New static variables. diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 8d957402..8e0a657 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -145,6 +145,7 @@ static ld_plugin_register_all_symbols_read register_all_symbols_read; static ld_plugin_get_symbols get_symbols, get_symbols_v2; static ld_plugin_register_cleanup register_cleanup; static ld_plugin_add_input_file add_input_file; +static ld_plugin_release_input_file release_input_file; static ld_plugin_add_input_library add_input_library; static ld_plugin_message message; static ld_plugin_add_symbols add_symbols; @@ -1006,6 +1007,8 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed) if (obj.objfile) simple_object_release_read (obj.objfile); + release_input_file (file); + return LDPS_OK; } @@ -1091,6 +1094,9 @@ onload (struct ld_plugin_tv *tv) case LDPT_ADD_INPUT_FILE: add_input_file = p->tv_u.tv_add_input_file; break; + case LDPT_RELEASE_INPUT_FILE: + release_input_file = p->tv_u.tv_release_input_file; + break; case LDPT_ADD_INPUT_LIBRARY: add_input_library = p->tv_u.tv_add_input_library; break;