From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id AD558385840C; Fri, 21 Apr 2023 02:39:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD558385840C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Delete struct artdata archive_head X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 0014c67d3bc3030af2d98be90c21e6ac1b15c6d8 X-Git-Newrev: 3bc69c18671c762f7412ceaae8c9c6a225bc81bc Message-Id: <20230421023929.AD558385840C@sourceware.org> Date: Fri, 21 Apr 2023 02:39:29 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2023 02:39:29 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3bc69c18671c= 762f7412ceaae8c9c6a225bc81bc commit 3bc69c18671c762f7412ceaae8c9c6a225bc81bc Author: Alan Modra Date: Thu Apr 20 12:14:09 2023 +0930 Delete struct artdata archive_head =20 This element is unused. Ideally we'd be moving archive_head and other archive specific fields from struct bfd to here, but that's a much larger change than this little bit of cleanup. =20 * libbfd-in.h (struct artdata): Delete archive_head. * libbfd.h: Regenerate. * archive.c, * coff-rs6000.c, * coff64-rs6000.c: Delete comments mentioning artdata archive_h= ead. Diff: --- bfd/archive.c | 20 +------------------- bfd/coff-rs6000.c | 7 ------- bfd/coff64-rs6000.c | 6 ------ bfd/libbfd-in.h | 1 - bfd/libbfd.h | 1 - 5 files changed, 1 insertion(+), 34 deletions(-) diff --git a/bfd/archive.c b/bfd/archive.c index 4cc2f7c9487..01bfcfc80a1 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -215,18 +215,7 @@ _bfd_generic_mkarchive (bfd *abfd) size_t amt =3D sizeof (struct artdata); =20 abfd->tdata.aout_ar_data =3D (struct artdata *) bfd_zalloc (abfd, amt); - if (bfd_ardata (abfd) =3D=3D NULL) - return false; - - /* Already cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache =3D NULL; - bfd_ardata (abfd)->archive_head =3D NULL; - bfd_ardata (abfd)->symdefs =3D NULL; - bfd_ardata (abfd)->extended_names =3D NULL; - bfd_ardata (abfd)->extended_names_size =3D 0; - bfd_ardata (abfd)->tdata =3D NULL; */ - - return true; + return bfd_ardata (abfd) !=3D NULL; } =20 /* @@ -905,13 +894,6 @@ bfd_generic_archive_p (bfd *abfd) } =20 bfd_ardata (abfd)->first_file_filepos =3D SARMAG; - /* Cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache =3D NULL; - bfd_ardata (abfd)->archive_head =3D NULL; - bfd_ardata (abfd)->symdefs =3D NULL; - bfd_ardata (abfd)->extended_names =3D NULL; - bfd_ardata (abfd)->extended_names_size =3D 0; - bfd_ardata (abfd)->tdata =3D NULL; */ =20 if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)) || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd))) diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 6c4e32c9f0d..5ea06fa2e09 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -1527,13 +1527,6 @@ _bfd_xcoff_archive_p (bfd *abfd) if (bfd_ardata (abfd) =3D=3D (struct artdata *) NULL) goto error_ret_restore; =20 - /* Cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache =3D NULL; - bfd_ardata (abfd)->archive_head =3D NULL; - bfd_ardata (abfd)->symdefs =3D NULL; - bfd_ardata (abfd)->extended_names =3D NULL; - bfd_ardata (abfd)->extended_names_size =3D 0; */ - /* Now handle the two formats. */ if (magic[1] !=3D 'b') { diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index f8a0bde8c30..a4f631ce0e0 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -1939,12 +1939,6 @@ xcoff64_archive_p (bfd *abfd) if (bfd_ardata (abfd) =3D=3D (struct artdata *) NULL) goto error_ret_restore; =20 - /* Already cleared by bfd_zalloc above. - bfd_ardata (abfd)->cache =3D NULL; - bfd_ardata (abfd)->archive_head =3D NULL; - bfd_ardata (abfd)->symdefs =3D NULL; - bfd_ardata (abfd)->extended_names =3D NULL; - bfd_ardata (abfd)->extended_names_size =3D 0; */ bfd_ardata (abfd)->first_file_filepos =3D bfd_scan_vma (hdr.firstmemoff, (const char **) NULL, 10); diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 561cef1a12e..68b5343fd2e 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -75,7 +75,6 @@ struct artdata file_ptr first_file_filepos; /* Speed up searching the armap */ htab_t cache; - bfd *archive_head; /* Only interesting in output routines. */ carsym *symdefs; /* The symdef entries. */ symindex symdef_count; /* How many there are. */ char *extended_names; /* Clever intel extension. */ diff --git a/bfd/libbfd.h b/bfd/libbfd.h index ae17717efa3..bb7f2f1efcf 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -81,7 +81,6 @@ struct artdata file_ptr first_file_filepos; /* Speed up searching the armap */ htab_t cache; - bfd *archive_head; /* Only interesting in output routines. */ carsym *symdefs; /* The symdef entries. */ symindex symdef_count; /* How many there are. */ char *extended_names; /* Clever intel extension. */