aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/emultempl/elf32.em2
-rw-r--r--ld/ldlang.c9
3 files changed, 14 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 17c703b..8b69b36 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-27 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
+ sections have been discarded.
+ (lang_do_version_exports_section): Set SEC_KEEP on export section.
+ * emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
+ sections.
+
2006-10-26 Joseph S. Myers <joseph@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 3350ac0..99fb8ab 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1214,7 +1214,7 @@ ${ELF_INTERPRETER_SET_DEFAULT}
/* Also set SEC_EXCLUDE, so that symbols defined in the warning
section don't get copied to the output. */
- s->flags |= SEC_EXCLUDE;
+ s->flags |= SEC_EXCLUDE | SEC_KEEP;
}
}
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 391fc1f..5df5170 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1736,8 +1736,9 @@ lang_map (void)
continue;
for (s = file->the_bfd->sections; s != NULL; s = s->next)
- if (s->output_section == NULL
- || s->output_section->owner != output_bfd)
+ if ((s->output_section == NULL
+ || s->output_section->owner != output_bfd)
+ && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
{
if (! dis_header_printed)
{
@@ -4629,7 +4630,7 @@ lang_size_sections_1
&newdot);
/* This symbol is relative to this section. */
- if ((tree->type.node_class == etree_provided
+ if ((tree->type.node_class == etree_provided
|| tree->type.node_class == etree_assign)
&& (tree->assign.dst [0] != '.'
|| tree->assign.dst [1] != '\0'))
@@ -6922,7 +6923,7 @@ lang_do_version_exports_section (void)
/* Do not free the contents, as we used them creating the regex. */
/* Do not include this section in the link. */
- sec->flags |= SEC_EXCLUDE;
+ sec->flags |= SEC_EXCLUDE | SEC_KEEP;
}
lreg = lang_new_vers_pattern (NULL, "*", NULL, FALSE);