aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
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 /bfd/elfxx-mips.c
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 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 5c4636a..d5f677f 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -1727,6 +1727,11 @@ mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data)
if (mips_elf_local_pic_function_p (h))
{
+ /* PR 12845: If H is in a section that has been garbage
+ collected it will have its output section set to *ABS*. */
+ if (bfd_is_abs_section (h->root.root.u.def.section->output_section))
+ return TRUE;
+
/* H is a function that might need $25 to be valid on entry.
If we're creating a non-PIC relocatable object, mark H as
being PIC. If we're creating a non-relocatable object with