aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2022-07-28 14:55:05 +0200
committerMichael Matz <matz@suse.de>2022-11-30 17:15:07 +0100
commit43ae96e94ab7e3d5dfdb0d7c1b6ba57814a43f1d (patch)
tree871b195db8aee37bf964239b6e27e2f2ed6a1686 /gdb
parentf978da64412f37228bba9f79b3c68b7c6917379c (diff)
downloadbinutils-43ae96e94ab7e3d5dfdb0d7c1b6ba57814a43f1d.zip
binutils-43ae96e94ab7e3d5dfdb0d7c1b6ba57814a43f1d.tar.gz
binutils-43ae96e94ab7e3d5dfdb0d7c1b6ba57814a43f1d.tar.bz2
section-select: Lazily resolve section matches
and remember the results. Before this the order of section matching is basically: foreach script-wild-stmt S foreach pattern P of S foreach inputfile I foreach section S of I match S against P if match: do action for S And this process is done three or four times: for each top-level call to walk_wild() or wild(), that is: check_input_sections, lang_gc_sections, lang_find_relro_sections and of course map_input_to_output_sections. So we iterate over all sections of all files many many times (for each glob). Reality is a bit more complicated (some special glob types don't need the full iteration over all sections, only over all files), but that's the gist of it. For future work this shuffles the whole ordering a bit by lazily doing the matching process and memoizing results, trading a little memory for a 75% speedup of the overall section selection process. This lazy resolution introduces a problem with sections added late that's corrected in the next patch.
Diffstat (limited to 'gdb')
0 files changed, 0 insertions, 0 deletions