aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-01-05 13:14:00 +0000
committerAlan Modra <amodra@gmail.com>2002-01-05 13:14:00 +0000
commit3dfe7a8c3a88e7b06afe7f8b98d247de175bec99 (patch)
tree884333c2ed61b53f0d50a4ccef05611cd7331be3 /ld/emultempl/elf32.em
parent7c6beb69886dccfb3cd3efbb5e966683936f6eac (diff)
downloadfsf-binutils-gdb-3dfe7a8c3a88e7b06afe7f8b98d247de175bec99.zip
fsf-binutils-gdb-3dfe7a8c3a88e7b06afe7f8b98d247de175bec99.tar.gz
fsf-binutils-gdb-3dfe7a8c3a88e7b06afe7f8b98d247de175bec99.tar.bz2
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
of bfd_section_list_remove and bfd_section_list_insert macros. * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise. * emultempl/mmo.em (mmo_place_orphan): Likewise.
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em11
1 files changed, 3 insertions, 8 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index d65923a..b2fd969 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1270,18 +1270,13 @@ gld${EMULATION_NAME}_place_orphan (file, s)
if (place->section != NULL)
{
- /* Unlink the section. */
+ /* Unlink the section. */
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
;
- *pps = snew->next;
- if (snew->next == NULL)
- snew->owner->section_tail = pps;
+ bfd_section_list_remove (output_bfd, pps);
/* Now tack it on to the "place->os" section list. */
- snew->next = *place->section;
- *place->section = snew;
- if (snew->next == NULL)
- snew->owner->section_tail = &snew->next;
+ bfd_section_list_insert (output_bfd, place->section, snew);
}
/* Save the end of this list. Further ophans of this type will