mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
Re: PR26656, power10 libstdc++.so segfault in __cxxabiv1::__cxa_throw
Some missing NULL checks meant a stub for a local symbol used a stub looking like the __tls_get_addr_opt stub. PR 26656 * elf64-ppc.c (ppc_build_one_stub, ppc_size_one_stub): Check for NULL stub_entry->h before calling is_tls_get_addr.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2020-09-28 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 26656
|
||||||
|
* elf64-ppc.c (ppc_build_one_stub, ppc_size_one_stub): Check for
|
||||||
|
NULL stub_entry->h before calling is_tls_get_addr.
|
||||||
|
|
||||||
2020-09-26 Alan Modra <amodra@gmail.com>
|
2020-09-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Depend on has_plt_localentry0.
|
* elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Depend on has_plt_localentry0.
|
||||||
|
@ -11678,6 +11678,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
|||||||
obfd = htab->params->stub_bfd;
|
obfd = htab->params->stub_bfd;
|
||||||
is_tga = ((stub_entry->stub_type == ppc_stub_plt_call_notoc
|
is_tga = ((stub_entry->stub_type == ppc_stub_plt_call_notoc
|
||||||
|| stub_entry->stub_type == ppc_stub_plt_call_both)
|
|| stub_entry->stub_type == ppc_stub_plt_call_both)
|
||||||
|
&& stub_entry->h != NULL
|
||||||
&& is_tls_get_addr (&stub_entry->h->elf, htab)
|
&& is_tls_get_addr (&stub_entry->h->elf, htab)
|
||||||
&& htab->params->tls_get_addr_opt);
|
&& htab->params->tls_get_addr_opt);
|
||||||
if (is_tga)
|
if (is_tga)
|
||||||
@ -12188,7 +12189,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
|||||||
case ppc_stub_plt_call_notoc:
|
case ppc_stub_plt_call_notoc:
|
||||||
case ppc_stub_plt_call_both:
|
case ppc_stub_plt_call_both:
|
||||||
lr_used = 0;
|
lr_used = 0;
|
||||||
if (is_tls_get_addr (&stub_entry->h->elf, htab)
|
if (stub_entry->h != NULL
|
||||||
|
&& is_tls_get_addr (&stub_entry->h->elf, htab)
|
||||||
&& htab->params->tls_get_addr_opt)
|
&& htab->params->tls_get_addr_opt)
|
||||||
{
|
{
|
||||||
lr_used += 7 * 4;
|
lr_used += 7 * 4;
|
||||||
@ -12258,6 +12260,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
|
|||||||
}
|
}
|
||||||
if ((stub_entry->stub_type == ppc_stub_plt_call_notoc
|
if ((stub_entry->stub_type == ppc_stub_plt_call_notoc
|
||||||
|| stub_entry->stub_type == ppc_stub_plt_call_both)
|
|| stub_entry->stub_type == ppc_stub_plt_call_both)
|
||||||
|
&& stub_entry->h != NULL
|
||||||
&& is_tls_get_addr (&stub_entry->h->elf, htab)
|
&& is_tls_get_addr (&stub_entry->h->elf, htab)
|
||||||
&& htab->params->tls_get_addr_opt)
|
&& htab->params->tls_get_addr_opt)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user