diff options
author | Alan Modra <amodra@gmail.com> | 2023-03-27 16:21:05 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-03-27 21:58:46 +1030 |
commit | 3bb1480e2a85de6850863d245e7b6da03a3887f7 (patch) | |
tree | c2a1b5f20ff5d472bdff341186e19e903980e4b2 /bfd | |
parent | 695c322803476e92e1566c90470b6bb737a40514 (diff) | |
download | gdb-3bb1480e2a85de6850863d245e7b6da03a3887f7.zip gdb-3bb1480e2a85de6850863d245e7b6da03a3887f7.tar.gz gdb-3bb1480e2a85de6850863d245e7b6da03a3887f7.tar.bz2 |
Set proper union selector tag
* coff-bfd.c (bfd_coff_get_auxent): After converting sym pointer
to an index, reset the union tag.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/coff-bfd.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/bfd/coff-bfd.c b/bfd/coff-bfd.c index 068eceb..9660b6b 100644 --- a/bfd/coff-bfd.c +++ b/bfd/coff-bfd.c @@ -82,19 +82,28 @@ bfd_coff_get_auxent (bfd *abfd, *pauxent = ent->u.auxent; if (ent->fix_tag) - pauxent->x_sym.x_tagndx.l = - ((combined_entry_type *) pauxent->x_sym.x_tagndx.p - - obj_raw_syments (abfd)); + { + pauxent->x_sym.x_tagndx.l = + ((combined_entry_type *) pauxent->x_sym.x_tagndx.p + - obj_raw_syments (abfd)); + ent->fix_tag = 0; + } if (ent->fix_end) - pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l = - ((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 = + ((combined_entry_type *) pauxent->x_sym.x_fcnary.x_fcn.x_endndx.p + - obj_raw_syments (abfd)); + ent->fix_end = 0; + } if (ent->fix_scnlen) - pauxent->x_csect.x_scnlen.l = - ((combined_entry_type *) pauxent->x_csect.x_scnlen.p - - obj_raw_syments (abfd)); + { + pauxent->x_csect.x_scnlen.l = + ((combined_entry_type *) pauxent->x_csect.x_scnlen.p + - obj_raw_syments (abfd)); + ent->fix_scnlen = 0; + } return true; } |