This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix pr4782


	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]