summaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorNikita Ermakov <coffe92@gmail.com>2020-05-15 08:27:57 +0930
committerAlan Modra <amodra@gmail.com>2020-05-15 08:30:33 +0930
commit6a31512fd4fdd38ee2b1ea78543d352f961ca172 (patch)
tree86649141dfab647395689d696875bf0adfca813c /gold/powerpc.cc
parent7813437494ac39f3aef392d06ed5416e84fe386b (diff)
downloadbinutils-gdb-6a31512fd4fdd38ee2b1ea78543d352f961ca172.tar.gz
gold: powerpc: Test whether sym is not a plugin in do_gc_mark_symbol
sym->object() could be either a Plugin or Powerpc_relobj. There could be a situation when Pluginobj would be proccessed in ppc_object->get_opd_ent(dst_off) as Powerpc_relobj and it leads to the segmentation fault. * powerpc.cc (do_gc_mark_symbol): Don't segfault on plugin symbols.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index eae483212b8..2010c1e3d2b 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -9056,7 +9056,7 @@ Target_powerpc<size, big_endian>::do_gc_mark_symbol(
Symbol_table* symtab,
Symbol* sym) const
{
- if (size == 64)
+ if (size == 64 && sym->object()->pluginobj() == NULL)
{
Powerpc_relobj<size, big_endian>* ppc_object
= static_cast<Powerpc_relobj<size, big_endian>*>(sym->object());