[binutils-gdb/binutils-2_43-branch] _bfd_write_ar_hdr

Alan Modra amodra@sourceware.org
Sat Jan 4 09:31:48 GMT 2025


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

commit 01da089627beb3bf50b8540e3716a88d464c2c39
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Jan 4 16:57:48 2025 +1030

    _bfd_write_ar_hdr
    
    This has been broken since commit 8f95b6e44955 in 2010, and apparently
    nobody has noticed.  How we write archive headers depends on the
    archive, not the contents.
    
            * libbfd-in.h (_bfd_write_ar_hdr): Correct.
            * libbfd.h: Regenerate.
    
    (cherry picked from commit c232d080c4f05b16e998bd49d6e2d92c56b6421e)

Diff:
---
 bfd/libbfd-in.h | 2 +-
 bfd/libbfd.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 950d7979a03..1430086db73 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -248,7 +248,7 @@ extern int bfd_generic_stat_arch_elt
 #define _bfd_read_ar_hdr(abfd) \
 	BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd))
 #define _bfd_write_ar_hdr(archive, abfd)	 \
-	BFD_SEND (abfd, _bfd_write_ar_hdr_fn, (archive, abfd))
+	BFD_SEND (archive, _bfd_write_ar_hdr_fn, (archive, abfd))
 

 /* Generic routines to use for BFD_JUMP_TABLE_GENERIC.  Use
    BFD_JUMP_TABLE_GENERIC (_bfd_generic).  */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 5da7541e06e..10371c4ab56 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -254,7 +254,7 @@ extern int bfd_generic_stat_arch_elt
 #define _bfd_read_ar_hdr(abfd) \
 	BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd))
 #define _bfd_write_ar_hdr(archive, abfd)	 \
-	BFD_SEND (abfd, _bfd_write_ar_hdr_fn, (archive, abfd))
+	BFD_SEND (archive, _bfd_write_ar_hdr_fn, (archive, abfd))
 

 /* Generic routines to use for BFD_JUMP_TABLE_GENERIC.  Use
    BFD_JUMP_TABLE_GENERIC (_bfd_generic).  */


More information about the Binutils-cvs mailing list