mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
* elf64-ppc.c (ppc64_elf_relocate_section): Force tail calls in
shared libs to resolve locally.
This commit is contained in:
@ -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>
|
2005-12-12 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* bfd-in2.h: Regenerate.
|
* bfd-in2.h: Regenerate.
|
||||||
|
@ -10070,10 +10070,12 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|
|||||||
if (stub_entry->stub_type == ppc_stub_plt_call)
|
if (stub_entry->stub_type == ppc_stub_plt_call)
|
||||||
{
|
{
|
||||||
/* If this is a plain branch rather than a branch
|
/* 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;
|
unsigned long br;
|
||||||
br = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
br = bfd_get_32 (input_bfd, contents + rel->r_offset);
|
||||||
if ((br & 1) == 0)
|
if (info->executable && (br & 1) == 0)
|
||||||
can_plt_call = TRUE;
|
can_plt_call = TRUE;
|
||||||
else
|
else
|
||||||
stub_entry = NULL;
|
stub_entry = NULL;
|
||||||
|
Reference in New Issue
Block a user