aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
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