XCOFF linker segmentation fault
[deliverable/binutils-gdb.git] / bfd / dwarf2.c
index 76af009e33aaf19014fc713ab9122891280cba7d..65c41611710e33462dc328ce827caa38d87a49f9 100644 (file)
@@ -4272,7 +4272,9 @@ save_section_vma (const bfd *abfd, struct dwarf2_debug *stash)
   if (stash->sec_vma == NULL)
     return FALSE;
   stash->sec_vma_count = abfd->section_count;
-  for (i = 0, s = abfd->sections; i < abfd->section_count; i++, s = s->next)
+  for (i = 0, s = abfd->sections;
+       s != NULL && i < abfd->section_count;
+       i++, s = s->next)
     {
       if (s->output_section != NULL)
        stash->sec_vma[i] = s->output_section->vma + s->output_offset;
@@ -4301,7 +4303,9 @@ section_vma_same (const bfd *abfd, const struct dwarf2_debug *stash)
   if (abfd->section_count != stash->sec_vma_count)
     return FALSE;
 
-  for (i = 0, s = abfd->sections; i < abfd->section_count; i++, s = s->next)
+  for (i = 0, s = abfd->sections;
+       s != NULL && i < abfd->section_count;
+       i++, s = s->next)
     {
       bfd_vma vma;
 
This page took 0.023441 seconds and 4 git commands to generate.