From 30920cabe8b44ae250acfb6309f7240b1747d981 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 29 Sep 2010 06:17:12 +0000 Subject: [PATCH] * ldlang.c (lang_place_orphans): Zero vma when relocatable or non-load section for orphans handled here. --- ld/ChangeLog | 5 +++++ ld/ldlang.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index bfa0e4d8e97..14a7f7c7ae5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2010-09-29 Alan Modra + + * ldlang.c (lang_place_orphans): Zero vma when relocatable or non-load + section for orphans handled here. + 2010-09-27 Ralf Wildenhues * configure: Regenerate. diff --git a/ld/ldlang.c b/ld/ldlang.c index 36750edcd62..0e60d1922df 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); } } -- 2.30.2