aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-07-12 01:40:25 +0000
committerAlan Modra <amodra@gmail.com>2007-07-12 01:40:25 +0000
commit3bf9618b718ab699c462ed2416cf29c0c0d2b4f7 (patch)
tree1306824e002ae367907c945127687ea3eb7b98f1 /ld/ldlang.c
parent2d9d480e3b8fc468ee6eabc019c5e51873093f23 (diff)
downloadgdb-3bf9618b718ab699c462ed2416cf29c0c0d2b4f7.zip
gdb-3bf9618b718ab699c462ed2416cf29c0c0d2b4f7.tar.gz
gdb-3bf9618b718ab699c462ed2416cf29c0c0d2b4f7.tar.bz2
PR 4782
* ldlang.c (lang_size_sections_1 <output_section_statement>): Only use expld.result when valid.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index e1c02cc..56edee8 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4242,13 +4242,12 @@ lang_size_sections_1
os->processed_vma = FALSE;
exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
- if (!expld.result.valid_p
- && expld.phase != lang_mark_phase_enum)
+ if (expld.result.valid_p)
+ dot = expld.result.value + expld.result.section->vma;
+ else if (expld.phase != lang_mark_phase_enum)
einfo (_("%F%S: non constant or forward reference"
" address expression for section %s\n"),
os->name);
-
- dot = expld.result.value + expld.result.section->vma;
}
if (os->bfd_section == NULL)