This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Generic orphan handling tweak
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 29 Sep 2010 15:45:06 +0930
- Subject: 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