[PATCH] SHF_MERGE fix
Jakub Jelinek
jakub@redhat.com
Mon Mar 4 07:17:00 GMT 2002
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
More information about the Binutils
mailing list