Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
authorSteve Chamberlain <sac@cygnus>
Wed, 14 Sep 1994 20:45:43 +0000 (20:45 +0000)
committerSteve Chamberlain <sac@cygnus>
Wed, 14 Sep 1994 20:45:43 +0000 (20:45 +0000)
* ldlang.c (lang_do_assignments): Make sure output statement
has an attached bfd_section before trying to dereference it.

ld/ChangeLog
ld/ldlang.c

index f08b651bc844637d87a3b23432e39ad21dfe6a13..a77789b40b6deda81ca8f981de45fccaa7d43faa 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep 14 12:49:12 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
+
+       * ldlang.c (lang_do_assignments): Make sure output statement
+       has an attached bfd_section before trying to dereference it.
+
 Wed Sep 14 12:48:09 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
 
        * ldmisc.c (vfinfo): Handle %D as %C, but never print the function
index 4bd40e5c886a5d8c0159ba27454208cc6f3a636e..2d8d4a4f3095862a25d7df6c22ccbd3e5f06acd7 100644 (file)
@@ -1987,8 +1987,13 @@ lang_do_assignments (s, output_section_statement, fill, dot)
              }
            if (os->load_base) 
              {
-               os->bfd_section->lma 
-                 = exp_get_abs_int(os->load_base, 0,"load base", lang_final_phase_enum);
+               /* If nothing has been placed into the output section then
+                  it won't have a bfd_section. */
+               if (os->bfd_section) 
+                 {
+                   os->bfd_section->lma 
+                     = exp_get_abs_int(os->load_base, 0,"load base", lang_final_phase_enum);
+                 }
              }
          }
          break;