aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i370.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-16 05:37:10 +0000
committerAlan Modra <amodra@gmail.com>2002-01-16 05:37:10 +0000
commitc601ffdbb07858c9120efe4c7086665d7324b069 (patch)
tree5fe6ed4258d8dee2cc8aac00568c53313c9be830 /bfd/elf32-i370.c
parentb012904272850138ff57e00c55b227b898aba7a0 (diff)
downloadgdb-c601ffdbb07858c9120efe4c7086665d7324b069.zip
gdb-c601ffdbb07858c9120efe4c7086665d7324b069.tar.gz
gdb-c601ffdbb07858c9120efe4c7086665d7324b069.tar.bz2
* 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 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. */