diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-22 11:44:59 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-25 07:13:14 -0600 |
commit | 2cf349be0e378fdedcb7d0b19dbc431df524cbe7 (patch) | |
tree | e81744a02db366a853f38cfaf1d94697dfa10022 | |
parent | 0d38576a34ec64a1b4500c9277a8e9d0f07e6774 (diff) | |
download | binutils-2cf349be0e378fdedcb7d0b19dbc431df524cbe7.zip binutils-2cf349be0e378fdedcb7d0b19dbc431df524cbe7.tar.gz binutils-2cf349be0e378fdedcb7d0b19dbc431df524cbe7.tar.bz2 |
Do not put linkage names into .gdb_index
This changes the .gdb_index writer to skip linkage names. This was
always done historically (though somewhat implicitly).
-rw-r--r-- | gdb/dwarf2/index-write.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index b7a2e21..afe55da 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1093,6 +1093,14 @@ write_cooked_index (cooked_index_vector *table, { for (const cooked_index_entry *entry : table->all_entries ()) { + /* GDB never put linkage names into .gdb_index. The theory here + is that a linkage name will normally be in the minimal + symbols anyway, so including it in the index is usually + redundant -- and the cases where it would not be redundant + are rare and not worth supporting. */ + if ((entry->flags & IS_LINKAGE) != 0) + continue; + const auto it = cu_index_htab.find (entry->per_cu); gdb_assert (it != cu_index_htab.cend ()); |