diff options
author | Steve Chamberlain <sac@cygnus> | 1994-09-14 20:45:43 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1994-09-14 20:45:43 +0000 |
commit | 467a038026851fffa1f554f09ae1a634d393f788 (patch) | |
tree | 8b0c2a2e88dfee966bf173d9f1988ef40f48a175 /ld/ldlang.c | |
parent | 1c1d90f1fe4223648f78ec6dfa3a19e0c48396ec (diff) | |
download | gdb-467a038026851fffa1f554f09ae1a634d393f788.zip gdb-467a038026851fffa1f554f09ae1a634d393f788.tar.gz gdb-467a038026851fffa1f554f09ae1a634d393f788.tar.bz2 |
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.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 4bd40e5..2d8d4a4 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; |