* ldlang.c (print_output_section_statement): Change ``no attached
authorIan Lance Taylor <ian@airs.com>
Fri, 13 May 1994 18:01:59 +0000 (18:01 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 13 May 1994 18:01:59 +0000 (18:01 +0000)
output section'' message slightly.
(lang_do_assignments): Don't recurse down if there is no real
section.

ld/ChangeLog
ld/ldlang.c

index 576118d9b3076da18585ab871e3bb1a4f90c4ee1..2913ea74b7bacf0afcabe1b661ba38992a1eda81 100644 (file)
@@ -1,5 +1,10 @@
 Fri May 13 13:00:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * ldlang.c (print_output_section_statement): Change ``no attached
+       output section'' message slightly.
+       (lang_do_assignments): Don't recurse down if there is no real
+       section.
+
        * config/i386-linux.mt (OTHER_EMULATIONS): Change em_ to e to
        match corresponding change in emulation templates.
        * config/i386-lynx.mt, config/m68k-lynx.mt: Likewise.
index 98a0e8d004355aa0d2d39c9051f84e4975d0a45c..a639fd1203748b8963c8011750f19e15fe13bd65 100644 (file)
@@ -1135,7 +1135,7 @@ print_output_section_statement (output_section_statement)
   }
   else
   {
-    fprintf (config.map_file, "No attached output section");
+    fprintf (config.map_file, " (no attached output section)");
   }
   print_nl ();
   if (output_section_statement->load_base)
@@ -1912,11 +1912,15 @@ lang_do_assignments (s, output_section_statement, fill, dot)
        case lang_output_section_statement_enum:
          {
            lang_output_section_statement_type *os =
-           &(s->output_section_statement);
+             &(s->output_section_statement);
 
-           dot = os->bfd_section->vma;
-           (void) lang_do_assignments (os->children.head, os, os->fill, dot);
-           dot = os->bfd_section->vma + os->bfd_section->_raw_size;
+           if (os->bfd_section != NULL)
+             {
+               dot = os->bfd_section->vma;
+               (void) lang_do_assignments (os->children.head, os,
+                                           os->fill, dot);
+               dot = os->bfd_section->vma + os->bfd_section->_raw_size;
+             }
          }
          break;
        case lang_wild_statement_enum: