Hi All,
We have the situation ,where the R12 is pointing to Thunk GEP ,not the
current function like
.size _ZN12Intermediate1vEv,.-_ZN12Intermediate1vEv
.set .LTHUNK0,_ZN12Intermediate1vEv
.align 2
.globl _ZThn8_N12Intermediate1vEv
.type _ZThn8_N12Intermediate1vEv, @function
_ZThn8_N12Intermediate1vEv:
.LFB27:
.file 2 "/home/vkumar1/tmp/64_bit/qsp_ppc/gnu/dkmcxx/lib.h"
.loc 2 13 16
.cfi_startproc
.LCF2:
0: addis 2,12,.TOC.-.LCF2@ha
addi 2,2,.TOC.-.LCF2@l
.localentry _ZThn8_N12Intermediate1vEv,.-_ZThn8_N12Intermediate1vEv
addi 3,3,-8
b .LTHUNK0
.cfi_endproc
.LFE27:
.size _ZThn8_N12Intermediate1vEv,.-_ZThn8_N12Intermediate1vEv
.section ".toc","aw"
.set .LC1,.LC0
.section ".text"
.align 2
.globl _ZN12Intermediate1vEv
.type _ZN12Intermediate1vEv, @function
_ZN12Intermediate1vEv:
.LFB25:
.loc 1 7 23
.cfi_startproc
.LCF1:
0: addis 2,12,.TOC.-.LCF1@ha
addi 2,2,.TOC.-.LCF1@l
.localentry _ZN12Intermediate1vEv,.-_ZN12Intermediate1vEv
mflr 0
std 0,16(1)
std 31,-8(1)
stdu 1,-64(1)
like above the control from "_ZThn8_N12Intermediate1vEv" (support
function for this pointer update) is transferred
"_ZN12Intermediate1vEv" by b inst (where its not updating the r12)
and in the beginning of "_ZN12Intermediate1vEv" we are loading the
toc base from r12 (which is incorrect ) ,we are investigating the
issue and one way to fix the issue is that make THUNK to update the
r12 ,the cal like bctrl or load the r12 with the function address in
the _ZN12Intermediate1vEv prologue code .
But before we go ahead ,please share your thoughts or shed some lights
on the same .
Thank you
~Umesh