[PATCH 3/8] BFD: Remove unused BFD pointer member of `struct orl'

Jan Beulich jbeulich@suse.com
Fri Oct 17 13:00:38 GMT 2025


On 27.09.2025 01:53, Maciej W. Rozycki wrote:
> From: Maciej W. Rozycki <macro@redhat.com>
> 
> The `abfd' member of `struct orl' has never been used.  Remove it along 
> with the enclosing union so as not to propagate clutter with the next 
> change, which adds that union as a distinct type.  No functional change.
> ---
>  bfd/archive.c     |   20 ++++++++------------
>  bfd/archive64.c   |    2 +-
>  bfd/coff-rs6000.c |   12 ++++++------
>  bfd/ecoff.c       |    4 ++--
>  bfd/libbfd.h      |    6 +-----
>  5 files changed, 18 insertions(+), 26 deletions(-)
> 
> --- binutils-gdb.orig/bfd/archive.c
> +++ binutils-gdb/bfd/archive.c
> @@ -168,11 +168,7 @@ INTERNAL
>  .struct orl		{* Output ranlib.  *}
>  .{
>  .  char **name;		{* Symbol name.  *}
> -.  union
> -.  {
> -.    file_ptr pos;
> -.    bfd *abfd;
> -.  } u;			{* bfd* or file position.  *}
> +.  bfd *abfd;		{* Containing BFD.  *}
>  .  int namidx;		{* Index into string table.  *}
>  .};

Seeing this change and ...

> @@ -2434,7 +2430,7 @@ _bfd_compute_and_write_armap (bfd *arch,
>  		      if (*(map[orl_count].name) == NULL)
>  			goto error_return;
>  		      strcpy (*(map[orl_count].name), syms[src_count]->name);
> -		      map[orl_count].u.abfd = current;
> +		      map[orl_count].abfd = current;

... use of the "abfd" member here, do you perhaps mean the "pos" member in
title and description? Otherwise I fear I'm confused.

Jan


More information about the Binutils mailing list