diff options
author | Alan Modra <amodra@bigpond.net.au> | 2005-05-03 17:05:51 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2005-05-03 17:05:51 +0000 |
commit | b5b2c246e49ab830e0488aef3cfe9b873ec60d22 (patch) | |
tree | 7b55510133c57fa41d22683a5f8ff4f099f585a0 /bfd/sunos.c | |
parent | 35a98770d34892d92bb0b248e34ab378ac0723f9 (diff) | |
download | gdb-b5b2c246e49ab830e0488aef3cfe9b873ec60d22.tar.gz |
* section.c (bfd_section_list_remove): Don't clear s->next.
(bfd_section_list_append): Always init s->prev.
(bfd_section_list_prepend): Define.
(bfd_section_list_insert_after): Minor optimization.
(bfd_section_removed_from_list): Rewrite.
* elf.c (assign_section_numbers): Simplify list traversal now that
bfd_section_list_remove doesn't destroy removed section next ptr.
* sunos.c (sunos_add_dynamic_symbols): Likewise.
* elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
* xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r-- | bfd/sunos.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c index 1b17d3eacda..5995f162fef 100644 --- a/bfd/sunos.c +++ b/bfd/sunos.c @@ -859,11 +859,10 @@ sunos_add_dynamic_symbols (bfd *abfd, abfd->sections = NULL; else { - asection *s, *n; + asection *s; - for (s = abfd->sections; s != NULL; s = n) + for (s = abfd->sections; s != NULL; s = s->next) { - n = s->next; if ((s->flags & SEC_LINKER_CREATED) == 0) bfd_section_list_remove (abfd, s); } |