aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-05 13:13:18 +0000
committerAlan Modra <amodra@gmail.com>2002-01-05 13:13:18 +0000
commit7c6beb69886dccfb3cd3efbb5e966683936f6eac (patch)
tree279bef92a9471f76cee4b5b32f2425bfd1531ec6 /gas/write.c
parent9e7b37b31f29ad3b8321d15e589ed5de550c56d3 (diff)
downloadgdb-7c6beb69886dccfb3cd3efbb5e966683936f6eac.zip
gdb-7c6beb69886dccfb3cd3efbb5e966683936f6eac.tar.gz
gdb-7c6beb69886dccfb3cd3efbb5e966683936f6eac.tar.bz2
* write.c (write_object_file): Make use of bfd_section_list_remove.
* config/obj-ecoff.c (ecoff_frob_file): Likewise. * config/tc-mmix.c (mmix_frob_file): Likewise.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gas/write.c b/gas/write.c
index 55db85a..9b20f90 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -1507,22 +1507,18 @@ write_object_file ()
#ifdef BFD_ASSEMBLER
/* Remove the sections created by gas for its own purposes. */
{
- asection **seclist, *sec;
+ asection **seclist;
int i;
seclist = &stdoutput->sections;
- while (seclist && *seclist)
+ while (*seclist)
{
- sec = *seclist;
- while (sec == reg_section || sec == expr_section)
+ if (*seclist == reg_section || *seclist == expr_section)
{
- sec = sec->next;
- *seclist = sec;
+ bfd_section_list_remove (stdoutput, seclist);
stdoutput->section_count--;
- if (!sec)
- break;
}
- if (*seclist)
+ else
seclist = &(*seclist)->next;
}
i = 0;