aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c9
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;