diff options
author | Alan Modra <amodra@gmail.com> | 2005-12-13 05:39:34 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-12-13 05:39:34 +0000 |
commit | 4fa1c2377aada42a2ecf3c3d16e1a3867fdd3d74 (patch) | |
tree | b0b6886b5d1f58b02a9e7a6ef6be87ec182581bd /bfd/elf64-ppc.c | |
parent | c9f278b66d215aad777ca7c8954e6bdc7c917b73 (diff) | |
download | gdb-4fa1c2377aada42a2ecf3c3d16e1a3867fdd3d74.zip gdb-4fa1c2377aada42a2ecf3c3d16e1a3867fdd3d74.tar.gz gdb-4fa1c2377aada42a2ecf3c3d16e1a3867fdd3d74.tar.bz2 |
* elf64-ppc.c (ppc64_elf_relocate_section): Force tail calls in
shared libs to resolve locally.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index b72c6bd..da1550e 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -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; |