aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-03-05 12:19:08 +0000
committerJakub Jelinek <jakub@redhat.com>2002-03-05 12:19:08 +0000
commit86eaf01e5d38979a989c0500511465dcb875fdcb (patch)
tree1d228b1ec16f25b9c4dbe65d07c2118118051358 /bfd
parent2d13d8c5ee27041f0eac45b45a7194e91fcf830a (diff)
downloadfsf-binutils-gdb-86eaf01e5d38979a989c0500511465dcb875fdcb.zip
fsf-binutils-gdb-86eaf01e5d38979a989c0500511465dcb875fdcb.tar.gz
fsf-binutils-gdb-86eaf01e5d38979a989c0500511465dcb875fdcb.tar.bz2
* merge.c (_bfd_merge_sections): Don't segfault if there
is nothing to merge due to GC.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/merge.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bcc16f3..a53bcbc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ * merge.c (_bfd_merge_sections): Don't segfault if there
+ is nothing to merge due to GC.
+
2002-03-05 Alan Modra <amodra@bigpond.net.au>
* elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
diff --git a/bfd/merge.c b/bfd/merge.c
index 7b06c10..e175efd 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