summaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2012-03-25 06:45:15 +0000
committerAlan Modra <amodra@bigpond.net.au>2012-03-25 06:45:15 +0000
commitbda24b473b98b96bf9b64f24b6f23fb96756bf70 (patch)
tree112179d3c9f2a4aa9bb81113d8971ca72471f1ba /ld/ldlang.c
parent391a8ed98323d2d7655a338016c745d3ba7ef959 (diff)
downloadbinutils-redhat-bda24b473b98b96bf9b64f24b6f23fb96756bf70.tar.gz
ld/
* ldemul.c (before_allocation_default): Revert last change. ldlang.c (lang_add_section): Likewise. (strip_excluded_output_sections): Don't strip output sections with user input sections when emitrelocations, unless all are SEC_EXCLUDE. ld/testsuite/ * ld-powerpc/vxworks-relax.rd: Remove check on reloc section file offset and reloc symbol indices.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 73e0179b01..b0c23cb449 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2380,7 +2380,6 @@ 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;
@@ -3887,8 +3886,9 @@ strip_excluded_output_sections (void)
asection *s;
for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
- if ((s->flags & SEC_LINKER_CREATED) != 0
- && (s->flags & SEC_EXCLUDE) == 0)
+ if ((s->flags & SEC_EXCLUDE) == 0
+ && ((s->flags & SEC_LINKER_CREATED) != 0
+ || link_info.emitrelocations))
{
exclude = FALSE;
break;