aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorOleg Tolmatcev <oleg.tolmatcev@gmail.com>2023-06-18 19:35:38 +0200
committerAlan Modra <amodra@gmail.com>2023-08-24 15:54:39 +0930
commit6aadf8a04d162feb2afe3c41f5b36534d661d447 (patch)
tree1f4e29669179cb6ff3e0c1e5e50ad2006b99c833 /bfd/coffgen.c
parentfb9b7fbf17f50fcfabf6e3d7d06a93e1f17c52b7 (diff)
downloadgdb-6aadf8a04d162feb2afe3c41f5b36534d661d447.zip
gdb-6aadf8a04d162feb2afe3c41f5b36534d661d447.tar.gz
gdb-6aadf8a04d162feb2afe3c41f5b36534d661d447.tar.bz2
optimize handle_COMDAT
Signed-off-by: Oleg Tolmatcev <oleg.tolmatcev@gmail.com>
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 1ec9a51..bf9633a 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -293,6 +293,8 @@ coff_object_cleanup (bfd *abfd)
htab_delete (td->section_by_index);
if (td->section_by_target_index)
htab_delete (td->section_by_target_index);
+ if (obj_pe (abfd) && pe_data (abfd)->comdat_hash)
+ htab_delete (pe_data (abfd)->comdat_hash);
}
}
}
@@ -3292,6 +3294,12 @@ _bfd_coff_free_cached_info (bfd *abfd)
tdata->section_by_target_index = NULL;
}
+ if (obj_pe (abfd) && pe_data (abfd)->comdat_hash)
+ {
+ htab_delete (pe_data (abfd)->comdat_hash);
+ pe_data (abfd)->comdat_hash = NULL;
+ }
+
_bfd_dwarf2_cleanup_debug_info (abfd, &tdata->dwarf2_find_line_info);
_bfd_stab_cleanup (abfd, &tdata->line_info);