aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em7
-rw-r--r--ld/emultempl/mmo.em4
-rw-r--r--ld/emultempl/pe.em4
3 files changed, 13 insertions, 2 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index ef71595..d65923a 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1274,10 +1274,14 @@ gld${EMULATION_NAME}_place_orphan (file, s)
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
;
*pps = snew->next;
+ if (snew->next == NULL)
+ snew->owner->section_tail = 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;
}
/* Save the end of this list. Further ophans of this type will
@@ -1598,8 +1602,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n"));
fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n"));
fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n"));
- fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n"));
- fprintf (file, _("\t\t\t at runtime\n"));
+ fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n\t\t\t at runtime\n"));
fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
EOF
fi
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em
index eaf0cae..f871dec 100644
--- a/ld/emultempl/mmo.em
+++ b/ld/emultempl/mmo.em
@@ -163,10 +163,14 @@ mmo_place_orphan (file, s)
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
;
*pps = snew->next;
+ if (snew->next == NULL)
+ snew->owner->section_tail = 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;
}
place->section = &snew->next; /* Save the end of this list. */
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 24ee657..0af1d76 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1691,10 +1691,14 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
pps = &(*pps)->next)
;
*pps = snew->next;
+ if (snew->next == NULL)
+ snew->owner->section_tail = 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;
}
/* Save the end of this list. Further ophans of this type will