]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld: put wild matching_sections on an obstack
authorAlan Modra <amodra@gmail.com>
Fri, 16 Jan 2026 05:49:31 +0000 (16:19 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 17 Jan 2026 01:20:02 +0000 (11:50 +1030)
commite6357caf75792c4a3284dcf5698d726de5c9f5ab
tree75edba8a30e8c2bafc2cc456f60f09ea89206acf
parent1522f86f18a8ccbe2e91b800526278e155e6b07d
ld: put wild matching_sections on an obstack

so that the memory can be reclaimed easily when reset_resolved_wilds
throws it all away.

* ldlang.c (matching_obstack): New static var.
(add_matching_section): Rewrite to use matching_obstack.
(lang_init): Init matching_obstack.
(reset_resolved_wilds): Free matching_obstack.
ld/ldlang.c