diff options
Diffstat (limited to 'bfd/elf32-i370.c')
-rw-r--r-- | bfd/elf32-i370.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c index 5c5740f..5ac43dd 100644 --- a/bfd/elf32-i370.c +++ b/bfd/elf32-i370.c @@ -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. */ |