aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-03-25 06:45:16 +0000
committerAlan Modra <amodra@gmail.com>2012-03-25 06:45:16 +0000
commitb514e6a51fefb7dde379f595b76dd9113e132487 (patch)
tree8e00f7fd72dca626b544b5b1c5b3c832afc8b2a8 /ld/ldlang.c
parent8f784a0e6ad19b9cd7afc9a67d7ee39a5f5f94cf (diff)
downloadgdb-b514e6a51fefb7dde379f595b76dd9113e132487.zip
gdb-b514e6a51fefb7dde379f595b76dd9113e132487.tar.gz
gdb-b514e6a51fefb7dde379f595b76dd9113e132487.tar.bz2
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 73e0179..b0c23cb 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;