Tidy some global bfd state used by gas
authorAlan Modra <amodra@gmail.com>
Wed, 11 Jan 2023 07:58:33 +0000 (18:28 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Jan 2023 08:35:26 +0000 (19:05 +1030)
* subsegs.c (subsegs_end): Clear abs and und userdata.

gas/subsegs.c

index c834ee2157ed31df36ff015a969be1f61e9c4ef4..ae42b4e76d9bf363ce91e9fa99a9ac2bd27fd653 100644 (file)
@@ -50,6 +50,8 @@ subsegs_end (struct obstack **obs)
   for (; *obs; obs++)
     _obstack_free (*obs, NULL);
   _obstack_free (&frchains, NULL);
+  bfd_set_section_userdata (bfd_abs_section_ptr, NULL);
+  bfd_set_section_userdata (bfd_und_section_ptr, NULL);
 }
 \f
 static void