From: Alan Modra Date: Fri, 23 Mar 2012 09:35:34 +0000 (+0000) Subject: * ldemul.c (before_allocation_default): When emitrelocations, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f24fcb9dad8d6883b0f2dfe302c87557aae3bd1e;p=binutils-gdb.git * ldemul.c (before_allocation_default): When emitrelocations, don't strip sections.. * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 1d810a7c04c..4b9d324ecde 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2012-03-23 Alan Modra + + * ldemul.c (before_allocation_default): When emitrelocations, + don't strip sections.. + * ldlang.c (lang_add_section): ..and don't set up map_head, map_tail. + 2012-03-14 Kai Tietz Pascal Obry diff --git a/ld/ldemul.c b/ld/ldemul.c index 85baeab3258..5e2fd82a0dd 100644 --- a/ld/ldemul.c +++ b/ld/ldemul.c @@ -237,7 +237,7 @@ after_allocation_default (void) void before_allocation_default (void) { - if (!link_info.relocatable) + if (!link_info.relocatable && !link_info.emitrelocations) strip_excluded_output_sections (); } diff --git a/ld/ldlang.c b/ld/ldlang.c index a95d2a58fea..73e0179b016 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -2380,6 +2380,7 @@ lang_add_section (lang_statement_list_type *ptr, section->output_section = output->bfd_section; if (!link_info.relocatable + && !link_info.emitrelocations && !stripped_excluded_sections) { asection *s = output->bfd_section->map_tail.s;