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]

Generic orphan handling tweak


Gives us a few more passes in the ld testsuite, for targets that don't
have fancy orphan handling.

	* ldlang.c (lang_place_orphans): Zero vma when relocatable or non-load
	section for orphans handled here.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.342
diff -u -p -r1.342 ldlang.c
--- ld/ldlang.c	23 Sep 2010 11:40:06 -0000	1.342
+++ ld/ldlang.c	28 Sep 2010 23:12:06 -0000
@@ -5906,6 +5906,10 @@ lang_place_orphans (void)
 		      os = lang_output_section_statement_lookup (name,
 								 constraint,
 								 TRUE);
+		      if (os->addr_tree == NULL
+			  && (link_info.relocatable
+			      || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0))
+			os->addr_tree = exp_intop (0);
 		      lang_add_section (&os->children, s, os);
 		    }
 		}

-- 
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]