aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 3a5939d..9d0a405 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -3170,12 +3170,16 @@ elf32_arm_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;
}