summaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-01-16 05:37:10 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-01-16 05:37:10 +0000
commit9b2a1d58c125f4584f436106dccbf0a1beebf144 (patch)
treed0c1ea45abe20d89c0fd3fbb189ae0d2a86533be /bfd/elf32-i370.c
parentb4b65fb57ba9663f6ee0dd3d0fc93b9b6ec81684 (diff)
downloadgdb-9b2a1d58c125f4584f436106dccbf0a1beebf144.tar.gz
* elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
sections, use bfd_section_list_remove. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. * elflink.h (elf_link_add_object_symbols): When removing all sections, use bfd_section_list_clear.
Diffstat (limited to 'bfd/elf32-i370.c')
-rw-r--r--bfd/elf32-i370.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 5c5740f2d54..5ac43dda756 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. */