aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-02-24 11:38:57 +1030
committerAlan Modra <amodra@gmail.com>2024-02-24 14:59:13 +1030
commit086c8f406d82ce171d5867eed93f1308e07252c5 (patch)
tree2968d0a88337f90ddaea4a91a929810fca35a6e7 /gdb/tui
parentbc45bfd25984a709dec4236daf412c58a127633a (diff)
downloadgdb-086c8f406d82ce171d5867eed93f1308e07252c5.zip
gdb-086c8f406d82ce171d5867eed93f1308e07252c5.tar.gz
gdb-086c8f406d82ce171d5867eed93f1308e07252c5.tar.bz2
PR25333, GAS is slow processing -fdebug-types-sections
gas needs to build lists of sections for each group. This arranges to build the lists earlier, so they can be used when looking for sections that belong to a group. Using the section hash table to find sections by name, then by group isn't efficient when there are numerous groups with the same section names. Using a hash table to quickly find a group, then searching by section name on a list for the group results in a 100-fold speed improvement assembling the testcase in this PR. To reduce the number of times we traverse the section list, the patch also moves some processing done in elf_adjust_symtab for linked-to section, to elf_frob_file. This requires a testsuite change because processing will stop before elf_frob_file if there is a parse error in section21.s, ie. you'll only get the "junk at end of line" error, not the "undefined linked-to symbol" errors. PR 25333 * config/obj-elf.c (struct group_list, groups): Move earlier. (match_section): New function, extracted from.. (get_section_by_match): ..here. (free_section_idx): Move earlier. (group_section_find, group_section_insert): New functions. (change_section): Use the above. (elf_set_group_name): New function. (obj_elf_attach_to_group): Use elf_set_group_name. (set_additional_section_info): Handle linked_to_symbol_name and stabs code, extracted from.. (adjust_stab_sections): ..here,.. (build_additional_section_info): ..and here. (elf_adjust_symtab): Don't call build_additional_section_info. (elf_frob_file): Adjust. * config/obj-elf.h (elf_set_group_name): Declare. * config/tc-xtensa.c (cache_literal_section): Use elf_set_group_name. (xtensa_make_property_section): Likewise. * testsuite/gas/elf/attach-1.d: Stricter group section matching, and changed group section ordering. * testsuite/gas/elf/attach-2.d: Stricter group section matching. * testsuite/gas/elf/attach-2.s: Provide section bar type. * testsuite/gas/elf/elf.exp: Run attach-2. * testsuite/gas/elf/section21.l: Update. * testsuite/gas/elf/section21.s: Don't check for a parse error.
Diffstat (limited to 'gdb/tui')
0 files changed, 0 insertions, 0 deletions