public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Fix pr4782
@ 2007-07-12  6:42 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2007-07-12  6:42 UTC (permalink / raw)
  To: binutils

	PR 4782
	* ldlang.c (lang_size_sections_1 <output_section_statement>): Only
	use expld.result when valid.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.265
diff -u -p -r1.265 ldlang.c
--- ld/ldlang.c	6 Jul 2007 14:09:41 -0000	1.265
+++ ld/ldlang.c	12 Jul 2007 01:19:53 -0000
@@ -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)

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-12  1:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-12  6:42 Fix pr4782 Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).