Tidy some global bfd state used by gas

Message ID Y751L9gX14jBBlO0@squeak.grove.modra.org
State Repeat Merge
Headers
Series Tidy some global bfd state used by gas |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

Alan Modra Jan. 11, 2023, 8:37 a.m. UTC
  * subsegs.c (subsegs_end): Clear abs and und userdata.
  

Patch

diff --git a/gas/subsegs.c b/gas/subsegs.c
index c834ee2157e..ae42b4e76d9 100644
--- a/gas/subsegs.c
+++ b/gas/subsegs.c
@@ -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);
 }
 
 static void