* emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
authorHans-Peter Nilsson <hp@axis.com>
Fri, 19 Jul 2002 02:56:59 +0000 (02:56 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 19 Jul 2002 02:56:59 +0000 (02:56 +0000)
output section.

ld/ChangeLog
ld/emultempl/mmo.em

index 876110fc2caad188165e3f14e7d61d25c12c4b3d..1443cc62f0f336815191ae33ca5cf8929008968c 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-19  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * emultempl/mmo.em (mmo_place_orphan): Handle case of no .text
+       output section.
+
 2002-07-16  Denis Chertykov  <denisc@overta.ru>
            Nick Clifton  <nickc@redhat.com>
            Frank Ch. Eigler  <fche@redhat.com>
index d8675bf392b50048b9e03225d317e942b924ae3a..23bab1653764b0883ef1f93ae592f61afe4ceffe 100644 (file)
@@ -152,6 +152,17 @@ mmo_place_orphan (file, s)
   /* Restore the global list pointer.  */
   stat_ptr = old;
 
+  /* We need an output section for .text as a root, so if there was none
+     (might happen with a peculiar linker script such as in "map
+     addresses", map-address.exp), we grab the output section created
+     above.  */
+  if (hold_text.os == NULL)
+    {
+      if (os == NULL)
+       return false;
+      hold_text.os = os;
+    }
+
   snew = os->bfd_section;
   bfd_section = place->os->bfd_section;
   if (place->section == NULL && bfd_section == NULL)
This page took 0.030446 seconds and 4 git commands to generate.