aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-29 19:38:28 +1030
committerAlan Modra <amodra@gmail.com>2015-02-09 14:06:27 +1030
commit989f98793c06132bb5cdc2f7807b7eee5108342f (patch)
tree55837e1e0a367fa4492dcde295e84c9ed2465cef /bfd/elflink.c
parentca4be51cd81b0bfff2ada60c98e7c67c936045b7 (diff)
downloadgdb-989f98793c06132bb5cdc2f7807b7eee5108342f.zip
gdb-989f98793c06132bb5cdc2f7807b7eee5108342f.tar.gz
gdb-989f98793c06132bb5cdc2f7807b7eee5108342f.tar.bz2
Don't segfault or assert on NULL tls_sec
Real code won't hit these, but it's possible to contrive a testcase.. * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL tls_sec. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 409be0c..16d9f20 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -9042,12 +9042,6 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
asection *tls_sec = elf_hash_table (flinfo->info)->tls_sec;
if (tls_sec != NULL)
sym.st_value -= tls_sec->vma;
- else
- {
- /* The TLS section may have been garbage collected. */
- BFD_ASSERT (flinfo->info->gc_sections
- && !input_sec->gc_mark);
- }
}
}
}