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.
+2002-01-05 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+
2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
* configure.tgt (x86_64-*-netbsd*): New target.
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
/* Put orphans after the first section on the list. */
place->section = &bfd_section->next;
- /* 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);
}
place->section = &snew->next; /* Save the end of this list. */
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