* elf64-ppc.c (ppc64_elf_relocate_section): Force tail calls in

shared libs to resolve locally.
This commit is contained in:
Alan Modra 2005-12-13 05:39:34 +00:00
parent c9f278b66d
commit 4fa1c2377a
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-12-13 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_relocate_section): Force tail calls in
shared libs to resolve locally.
2005-12-12 Paul Brook <paul@codesourcery.com>
* bfd-in2.h: Regenerate.

View File

@ -10070,10 +10070,12 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (stub_entry->stub_type == ppc_stub_plt_call)
{
/* If this is a plain branch rather than a branch
and link, don't require a nop. */
and link, don't require a nop. However, don't
allow tail calls in a shared library as they
will result in r2 being corrupted. */
unsigned long br;
br = bfd_get_32 (input_bfd, contents + rel->r_offset);
if ((br & 1) == 0)
if (info->executable && (br & 1) == 0)
can_plt_call = TRUE;
else
stub_entry = NULL;