From: Steve Chamberlain Date: Wed, 14 Sep 1994 20:45:43 +0000 (+0000) Subject: Wed Sep 14 12:49:12 1994 Steve Chamberlain (sac@jonny.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=467a038026851fffa1f554f09ae1a634d393f788;p=binutils-gdb.git 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. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index f08b651bc84..a77789b40b6 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/ldlang.c b/ld/ldlang.c index 4bd40e5c886..2d8d4a4f309 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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;