From patchwork Fri Jan 27 07:01:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 49110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp690954wrn; Thu, 26 Jan 2023 23:01:59 -0800 (PST) X-Google-Smtp-Source: AK7set+o96dkfIG+6D8K6ZVbVH0soO/bhxOX+JoaXJWNhCk2Khg0eV/0hEsICVjJbw/wbeNNG8TE X-Received: by 2002:a17:907:1303:b0:878:5524:e92d with SMTP id vj3-20020a170907130300b008785524e92dmr4874718ejb.33.1674802919319; Thu, 26 Jan 2023 23:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674802919; cv=none; d=google.com; s=arc-20160816; b=ZCkEttQt/cA8U9TuFrTOfYrwAh+1oPFpx+Ew0S+fxt/zyhYYehQHw2xNf2h9rhgiyW 0zQcvPiKAvCnWXIorG0vvWWgbW25+1uhTdbyWjRSXkHnF55UO0LlcJ3nHEKzPEOrK8Kk DL3E548EbCxFz+RWkaep8wVHtcZkUDXutsFG+1CMRf044evIbKhNkCMraBRtyT+dzAbo ib7sgCAY827A0tf4sYqA8Cs+geAUMqhAvmWV7IaX6M+0MXHrEczTv1GNNXiRFS7YQAP1 tqD5hIqpDr2mudgYlN1Q9DUfJruG4ADVGS6+EA4WSQl97n4zxfQ2Z7mMu8Y4qmIU7hcB 3Jhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=q3UTzzUc0lOnu5VhVm8RDTAkkXVq3pNuXKqKuqh1WRg=; b=VGHqVQbM+25vXvcRRzgh4kIM/qYVGUHlOnqzYCIznY/f8aVMsUVoOvAnF3ou2yDK6G R/hv8arPUhiv8Bg/yV8UeQXf6y5Cw7Ub+8Yz0gGrg92W2hN3Gcy5jC5pOceTkJS9qw8Q bICX2s1BAP2P7ObISdewPTapkbZKXbOnb/DOSg970W0f6j2WXFjHBHaxBJqmxN5xTC0o QfOwQqQgn99lQB9khn2Oe+DUtw1XFMaEigf22K0xJlra51Tc5c4/4Tg+hG3yLiC5FX7t uUZCUSlrU4UJIEazQ+OjX3Sq9MVWA6xuPN0KmOovttO2C38F9MFo4Ae4BpUmsU69Zcar fiSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=EWaj9QFo; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ce11-20020a170906b24b00b0087122fab4c0si3828258ejb.155.2023.01.26.23.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 23:01:59 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=EWaj9QFo; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1723C3858401 for ; Fri, 27 Jan 2023 07:01:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1723C3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674802918; bh=q3UTzzUc0lOnu5VhVm8RDTAkkXVq3pNuXKqKuqh1WRg=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=EWaj9QFo5TJRBwOcBteaBjiil7a+LhKh9nsU24FAHReTdf0+sxv/c79SwXM0HSw/0 LC7GF2nHWlCsjdavXxZSgXMnXnRnU3SL/J+hz5CUq688wkZ9WKOvZQpcxq4qtaKkpq 9eTp1O0sSR3fwir56MpM/ZD2Smso2t8AbJsjXarY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id BB6BF385840F for ; Fri, 27 Jan 2023 07:01:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB6BF385840F Received: by mail-pl1-x62e.google.com with SMTP id g23so4072009plq.12 for ; Thu, 26 Jan 2023 23:01:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q3UTzzUc0lOnu5VhVm8RDTAkkXVq3pNuXKqKuqh1WRg=; b=0IbSYLvUuo4HgDYVNgyDrYNzxK3GAIKXOb3ynXAI7eKQzDaiBHhDHk73SubHJS7KVk tZTN6cb9QHf3Hb1NnKOCBE8YQoOK4CXvWC+CxYLeQGkmS6roT0rUz7NfCvlQi6Uy6MpS Nt6vNocbhTNGLvbL4Jkb2mJ0ubmdtN+tCXOW0tKH2v9DZjXYhjjR1Ufwg4V++tP3UJM1 ECP3WnD7uKfKfqnKLJ1y2JB3OR+pfZN+CUUSQLz8gfNDvIznPuN5vrsKQrRc61FTZ6W6 nO38UZt27xWK6T8cBZMMPHNYmlOqMjqfaycrgNq/acfnIveEjrVI8eOuk45EN6r/YbXx Jdqw== X-Gm-Message-State: AFqh2krzG1RTaeqKLYrTI1iE3PQ+31QhgMsBjnA7W+V2ZVJm5/yOMlZz L9qB/C8fLWUSggZtR+wy1qh1GIhY2Rg= X-Received: by 2002:a05:6a20:54a4:b0:a4:3fc2:eb10 with SMTP id i36-20020a056a2054a400b000a43fc2eb10mr48509281pzk.37.1674802879563; Thu, 26 Jan 2023 23:01:19 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:fb44:1882:a135:67f]) by smtp.gmail.com with ESMTPSA id o18-20020a639212000000b0047850cecbdesm1710298pgd.69.2023.01.26.23.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 23:01:19 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 30EFD1142E33; Fri, 27 Jan 2023 17:31:17 +1030 (ACDT) Date: Fri, 27 Jan 2023 17:31:17 +1030 To: binutils@sourceware.org Subject: Call bfd_close_all_done in output_file_close Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756158145770973543?= X-GMAIL-MSGID: =?utf-8?q?1756158145770973543?= bfd_cache_close_all is good for closing file descriptors, but doesn't do the cleanup of bfd memory as in bfd_close_all_done. PR 13056 * output-file.c (output_file_close): Call bfd_close_all_done, not bfd_cache_close_all. diff --git a/gas/output-file.c b/gas/output-file.c index 4c97e8f1a9b..88f40116513 100644 --- a/gas/output-file.c +++ b/gas/output-file.c @@ -96,7 +96,7 @@ output_file_close (void) /* Close the bfd. */ if (!flag_always_generate_output && had_errors ()) - res = bfd_cache_close_all (); + res = bfd_close_all_done (obfd); else res = bfd_close (obfd); now_seg = NULL;