This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Support fusion for ELFv2 stubs
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 5 Feb 2020 07:22:24 +1030
- Subject: Re: Support fusion for ELFv2 stubs
git commit 397998fc32a3 changed the stubs but not the comments.
* elf64-ppc.c (ppc_stub_plt_branch): Match comment with reality.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index b3f8f6b359..2bc0f9da10 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2817,8 +2817,8 @@ must_be_dyn_reloc (struct bfd_link_info *info,
ppc_stub_plt_branch:
Similar to the above, but a 24 bit branch in the stub section won't
reach its destination.
- . addis %r11,%r2,xxx@toc@ha
- . ld %r12,xxx@toc@l(%r11)
+ . addis %r12,%r2,xxx@toc@ha
+ . ld %r12,xxx@toc@l(%r12)
. mtctr %r12
. bctr
@@ -2844,8 +2844,8 @@ must_be_dyn_reloc (struct bfd_link_info *info,
A ppc_stub_plt_branch with an r2 offset looks like:
. std %r2,40(%r1)
- . addis %r11,%r2,xxx@toc@ha
- . ld %r12,xxx@toc@l(%r11)
+ . addis %r12,%r2,xxx@toc@ha
+ . ld %r12,xxx@toc@l(%r12)
. addis %r2,%r2,off@ha
. addi %r2,%r2,off@l
. mtctr %r12
--
Alan Modra
Australia Development Lab, IBM