From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62e.google.com with SMTP id g23so4072009plq.12 for ; Thu, 26 Jan 2023 23:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=q3UTzzUc0lOnu5VhVm8RDTAkkXVq3pNuXKqKuqh1WRg=; b=EMcupzE/eInsgmP5/C/Z5gG1QG+UkU3H85a8MGHtzYqZxoRi5otEB4y/3NjvfKrimT ykqDIMNZaj26kSfcEz6sJXoNBF5DnsPu45YF0rVi9f9zhJvHaHmJJ2NudbmAsRhzR3xo jdox8GnNCxKKwLt7201dMReVpHV2tK3f4NilVoIzpTNM4k9kK0rTSV1lrPZLiFOuIXJW IdZCDH9Iq9BlQHa0/JQsW7UtMYjBPi9R3cISyLUnR4RJpjkSHKJd0ZjvRokUvbcAlnuc YOQU6zM7o7hro3x2leJnH2PaEvVq7R/tWltddwdXjYNxS13SikFsAucVhLTvpMerZRQX Ob3Q== 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-Google-Smtp-Source: AMrXdXte3LL6//zDE0akv49x/t0YCwMBHBjxZM/R9vGTdb3XjfhXv2M0wTsM3d9Vyt93aIv4PaHkQQ== 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 From: Alan Modra To: binutils@sourceware.org Subject: Call bfd_close_all_done in output_file_close Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 List-Id: 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; -- Alan Modra Australia Development Lab, IBM