Commit: Release the matching_objstack when it is no longer needed.

Nick Clifton nickc@redhat.com
Mon Jan 19 15:52:57 GMT 2026


Hi Guys,

  I am applying the patch below to supplement Alan's patch that puts all
  of the matching data onto an objstack (e6357caf7579).  The patch just
  adds a final release of the data once it is no longer needed, closing
  off a memory leak.

Cheers
  Nick
  
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 26bd52240c1..0ef33e8a4e6 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -8713,6 +8713,9 @@ lang_process (void)
 
   ldemul_finish ();
 
+  /* We should not need the wildcard information any more.  */
+  reset_resolved_wilds ();
+
   /* Convert absolute symbols to section relative.  */
   ldexp_finalize_syms ();
 



More information about the Binutils mailing list