From 86eaf01e5d38979a989c0500511465dcb875fdcb Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 5 Mar 2002 12:19:08 +0000 Subject: [PATCH] * merge.c (_bfd_merge_sections): Don't segfault if there is nothing to merge due to GC. --- bfd/ChangeLog | 5 +++++ bfd/merge.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bcc16f3be0d..a53bcbcde86 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-03-05 Jakub Jelinek + + * merge.c (_bfd_merge_sections): Don't segfault if there + is nothing to merge due to GC. + 2002-03-05 Alan Modra * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep diff --git a/bfd/merge.c b/bfd/merge.c index 7b06c10debe..e175efdf881 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -804,6 +804,9 @@ _bfd_merge_sections (abfd, xsinfo, remove_hook) if (secinfo) continue; + if (sinfo->htab->first == NULL) + continue; + if (sinfo->htab->strings) merge_strings (sinfo); else -- 2.30.2