This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] SHF_MERGE fix
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 4 Mar 2002 16:16:50 +0100
- Subject: [PATCH] SHF_MERGE fix
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
If GC removes all input sections with the same name, SHF_STRINGS setting
and sh_entsize, we would segfault...
Ok to commit?
2002-03-04 Jakub Jelinek <jakub@redhat.com>
* merge.c (_bfd_merge_sections): Don't segfault if there
is nothing to merge due to GC.
--- bfd/merge.c.jj Mon Jan 14 17:53:10 2002
+++ bfd/merge.c Mon Mar 4 16:20:55 2002
@@ -804,6 +804,9 @@ _bfd_merge_sections (abfd, xsinfo, remov
if (secinfo)
continue;
+ if (sinfo->htab->first == NULL)
+ continue;
+
if (sinfo->htab->strings)
merge_strings (sinfo);
else
Jakub