aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-09 10:36:20 +0000
committerNick Clifton <nickc@redhat.com>2011-06-09 10:36:20 +0000
commitba85c43e2c325ceb90f8716fa9a05590c32aef5d (patch)
tree4addccc0d288815b3722e8cd3f644cd64ebf8f1f /ld
parentc56791bbad4c8e1e0afbf6b3ae4a5d7e91ee8742 (diff)
downloadgdb-ba85c43e2c325ceb90f8716fa9a05590c32aef5d.zip
gdb-ba85c43e2c325ceb90f8716fa9a05590c32aef5d.tar.gz
gdb-ba85c43e2c325ceb90f8716fa9a05590c32aef5d.tar.bz2
PR ld/12845
* elf.c (_bfd_elf_init_private_section_data): Add an assertion that the output section has an allocated bfd_elf_section_data structure. * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for symbols in sections that have been removed by garbage collection. * emultempl/mipself.em (mips_add_stub_section): Do not add stubs for sections that have been removed by garbage collection.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/emultempl/mipself.em5
2 files changed, 11 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6f804b9..d5595c6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-09 Nick Clifton <nickc@redhat.com>
+
+ PR ld/12845
+ * emultempl/mipself.em (mips_add_stub_section): Do not add stubs
+ for sections that have been removed by garbage collection.
+
2011-06-08 Alan Modra <amodra@gmail.com>
* ldlang.c (lang_one_common): Handle warning symbols.
diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em
index 7a13d4d..ada0786 100644
--- a/ld/emultempl/mipself.em
+++ b/ld/emultempl/mipself.em
@@ -138,6 +138,11 @@ mips_add_stub_section (const char *stub_sec_name, asection *input_section,
lang_output_section_statement_type *os;
struct hook_stub_info info;
+ /* PR 12845: If the input section has been garbage collected it will
+ not have its output section set to *ABS*. */
+ if (bfd_is_abs_section (output_section))
+ return NULL;
+
/* Create the stub file, if we haven't already. */
if (stub_file == NULL)
{