* elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
[deliverable/binutils-gdb.git] / bfd / elf32-i370.c
index 5c5740f2d54c2ff0c718d09305fcc1497d09c2a3..5ac43dda75639d85781b83f5c98226c0c6a65113 100644 (file)
@@ -881,12 +881,16 @@ i370_elf_size_dynamic_sections (output_bfd, info)
          asection **spp;
 
          for (spp = &s->output_section->owner->sections;
-              *spp != s->output_section;
+              *spp != NULL;
               spp = &(*spp)->next)
-           ;
-         *spp = s->output_section->next;
-         --s->output_section->owner->section_count;
-
+           {
+             if (*spp == s->output_section)
+               {
+                 bfd_section_list_remove (s->output_section->owner, spp);
+                 --s->output_section->owner->section_count;
+                 break;
+               }
+           }
          continue;
        }
       /* Allocate memory for the section contents.  */
This page took 0.023646 seconds and 4 git commands to generate.