aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldlang.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index bfa0e4d..14a7f7c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-29 Alan Modra <amodra@gmail.com>
+
+ * ldlang.c (lang_place_orphans): Zero vma when relocatable or non-load
+ section for orphans handled here.
+
2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 36750ed..0e60d19 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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);
}
}