Change register usage in .glink resolver stub

We were previously using r0 in a position where it would be treated
as constant zero.  Chose to use r12 there instead as it is available
at that point.  Fixes #85.

Signed-off-by: Bill Schmidt <wschmidt@linux.ibm.com>
master
Bill Schmidt 5 years ago
parent 9c8f350249
commit 6e46fc0f13

@ -1084,9 +1084,9 @@ bctr</programlisting>
mtlr r0 mtlr r0
# Compute .plt section index from entry point address in r12 # Compute .plt section index from entry point address in r12
# .plt section index is placed into r0 as argument to the resolver # .plt section index is placed into r0 as argument to the resolver
sub r0,r12,r11 sub <phrase revisionflag="changed">r12</phrase>,r12,r11
subi r0,r0,res_0-1b subi <phrase revisionflag="changed">r12,r12</phrase>,res_0-1b
srdi r0,r0,2 srdi r0,<phrase revisionflag="changed">r12</phrase>,2
# Load address of the first byte of the PLT # Load address of the first byte of the PLT
ld r12,PLToffset-1b(r11) ld r12,PLToffset-1b(r11)
add r11,r12,r11 add r11,r12,r11

Loading…
Cancel
Save