public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] XCOFF: use bfd_coff_close_and_cleanup
Date: Tue, 21 Mar 2023 22:48:35 +0000 (GMT)	[thread overview]
Message-ID: <20230321224835.3A234385842C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=509ab0875d598dc36edb80d4d6a957b41540d992

commit 509ab0875d598dc36edb80d4d6a957b41540d992
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Mar 22 08:55:19 2023 +1030

    XCOFF: use bfd_coff_close_and_cleanup
    
    Free memory on closing bfds.  The COFF close_and_cleanup does more
    work than _bfd_generic_close_and_cleanup (defined as
    _bfd_archive_close_and_cleanup).
    
            * coff-rs6000.c (_bfd_xcoff_close_and_cleanup): Define as
            _bfd_coff_close_and_cleanup.
            * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Use
            _bfd_coff_close_and_cleanup.

Diff:
---
 bfd/coff-rs6000.c   | 2 +-
 bfd/coff64-rs6000.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 735d434951e..ea8c8287652 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -4368,7 +4368,7 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
 };
 
 /* For generic entry points.  */
-#define _bfd_xcoff_close_and_cleanup _bfd_archive_close_and_cleanup
+#define _bfd_xcoff_close_and_cleanup _bfd_coff_close_and_cleanup
 #define _bfd_xcoff_bfd_free_cached_info _bfd_bool_bfd_true
 #define _bfd_xcoff_new_section_hook coff_new_section_hook
 #define _bfd_xcoff_get_section_contents _bfd_generic_get_section_contents
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 929a773f52e..e3a5da37418 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -2624,7 +2624,7 @@ const bfd_target rs6000_xcoff64_vec =
     },
 
     /* Generic */
-    _bfd_archive_close_and_cleanup,
+    _bfd_coff_close_and_cleanup,
     _bfd_bool_bfd_true,
     coff_new_section_hook,
     _bfd_generic_get_section_contents,
@@ -2897,7 +2897,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
     },
 
     /* Generic */
-    _bfd_archive_close_and_cleanup,
+    _bfd_coff_close_and_cleanup,
     _bfd_bool_bfd_true,
     coff_new_section_hook,
     _bfd_generic_get_section_contents,

                 reply	other threads:[~2023-03-21 22:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230321224835.3A234385842C@sourceware.org \
    --to=amodra@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).