aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index d83e274..be296bc 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -213,10 +213,14 @@ new_rel (bfd_vma value, asection *section)
static void
new_rel_from_abs (bfd_vma value)
{
+ asection *s = expld.section;
+
+ if (s == bfd_abs_section_ptr && expld.phase == lang_final_phase_enum)
+ s = section_for_dot ();
expld.result.valid_p = TRUE;
- expld.result.value = value - expld.section->vma;
+ expld.result.value = value - s->vma;
expld.result.str = NULL;
- expld.result.section = expld.section;
+ expld.result.section = s;
}
static void