From: Alan Modra Date: Thu, 12 Jul 2007 01:40:25 +0000 (+0000) Subject: PR 4782 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bf9618b718ab699c462ed2416cf29c0c0d2b4f7;p=binutils-gdb.git PR 4782 * ldlang.c (lang_size_sections_1 ): Only use expld.result when valid. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index bf73bb47939..0d1bcc78b39 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2007-07-12 Alan Modra + + PR 4782 + * ldlang.c (lang_size_sections_1 ): Only + use expld.result when valid. + 2007-07-12 Alan Modra * emultempl/spuelf.em (embedded_spu_file): Test for NULL path diff --git a/ld/ldlang.c b/ld/ldlang.c index e1c02cc441c..56edee80a1d 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)