[PATCH v4 02/14] BFD: Remove extraneous BFD struct member setup from `bfd_make_readable'
Maciej W. Rozycki
macro@orcam.me.uk
Tue Jan 13 01:44:17 GMT 2026
From: Maciej W. Rozycki <macro@redhat.com>
Complementing commit 3097045a18a8 ("ld plugin bfd_make_readable leak")
remove assignments to BFD struct members from `bfd_make_readable' that
now duplicate ones unconditionally made by `_bfd_free_cached_info'
called earlier on.
---
New change in v4.
---
bfd/opncls.c | 3 ---
1 file changed, 3 deletions(-)
binutils-bfd-bfd-make-readable-usrdata.diff
Index: binutils-gdb/bfd/opncls.c
===================================================================
--- binutils-gdb.orig/bfd/opncls.c
+++ binutils-gdb/bfd/opncls.c
@@ -1032,15 +1032,12 @@ bfd_make_readable (bfd *abfd)
abfd->origin = 0;
abfd->opened_once = false;
abfd->output_has_begun = false;
- abfd->usrdata = NULL;
abfd->cacheable = false;
abfd->mtime_set = false;
abfd->target_defaulted = true;
abfd->direction = read_direction;
abfd->symcount = 0;
- abfd->outsymbols = 0;
- abfd->tdata.any = 0;
abfd->size = 0;
bfd_check_format (abfd, bfd_object);
More information about the Binutils
mailing list