diff options
author | Alan Modra <amodra@gmail.com> | 2005-05-03 17:05:51 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-05-03 17:05:51 +0000 |
commit | 04dd1667401316be04feb97696399d0728b63bf6 (patch) | |
tree | 849dce115776a1595762ea91b3fc857ea24673fb /bfd/elf.c | |
parent | c1d05a606c3ae775523d364d3aa185ba1dd7ab46 (diff) | |
download | gdb-04dd1667401316be04feb97696399d0728b63bf6.zip gdb-04dd1667401316be04feb97696399d0728b63bf6.tar.gz gdb-04dd1667401316be04feb97696399d0728b63bf6.tar.bz2 |
* 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/elf.c')
-rw-r--r-- | bfd/elf.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2762,14 +2762,11 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) /* SHT_GROUP sections are in relocatable files only. */ if (link_info == NULL || link_info->relocatable) { - asection *n; - /* Put SHT_GROUP sections first. */ - for (sec = abfd->sections; sec; sec = n) + for (sec = abfd->sections; sec != NULL; sec = sec->next) { d = elf_section_data (sec); - n = sec->next; if (d->this_hdr.sh_type == SHT_GROUP) { if (sec->flags & SEC_LINKER_CREATED) |