From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 23CBF3858C54; Mon, 27 Mar 2023 11:29:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23CBF3858C54 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] Set proper union selector tag X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 695c322803476e92e1566c90470b6bb737a40514 X-Git-Newrev: 3bb1480e2a85de6850863d245e7b6da03a3887f7 Message-Id: <20230327112931.23CBF3858C54@sourceware.org> Date: Mon, 27 Mar 2023 11:29:31 +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: Mon, 27 Mar 2023 11:29:31 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3bb1480e2a85= de6850863d245e7b6da03a3887f7 commit 3bb1480e2a85de6850863d245e7b6da03a3887f7 Author: Alan Modra Date: Mon Mar 27 16:21:05 2023 +1030 Set proper union selector tag =20 * coff-bfd.c (bfd_coff_get_auxent): After converting sym pointer to an index, reset the union tag. Diff: --- bfd/coff-bfd.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/bfd/coff-bfd.c b/bfd/coff-bfd.c index 068ecebc8df..9660b6b14e5 100644 --- a/bfd/coff-bfd.c +++ b/bfd/coff-bfd.c @@ -82,19 +82,28 @@ bfd_coff_get_auxent (bfd *abfd, *pauxent =3D ent->u.auxent; =20 if (ent->fix_tag) - pauxent->x_sym.x_tagndx.l =3D - ((combined_entry_type *) pauxent->x_sym.x_tagndx.p - - obj_raw_syments (abfd)); + { + pauxent->x_sym.x_tagndx.l =3D + ((combined_entry_type *) pauxent->x_sym.x_tagndx.p + - obj_raw_syments (abfd)); + ent->fix_tag =3D 0; + } =20 if (ent->fix_end) - pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l =3D - ((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p - - obj_raw_syments (abfd)); + { + pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l =3D + ((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p + - obj_raw_syments (abfd)); + ent->fix_end =3D 0; + } =20 if (ent->fix_scnlen) - pauxent->x_csect.x_scnlen.l =3D - ((combined_entry_type *) pauxent->x_csect.x_scnlen.p - - obj_raw_syments (abfd)); + { + pauxent->x_csect.x_scnlen.l =3D + ((combined_entry_type *) pauxent->x_csect.x_scnlen.p + - obj_raw_syments (abfd)); + ent->fix_scnlen =3D 0; + } =20 return true; }