> 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 .
Is that on VxWorks in kernel mode? If so, the loader doesn't abide by the ELFv2 ABI so the simple way out is to disable asm thunks altogether: #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK #define TARGET_ASM_CAN_OUTPUT_MI_THUNK rs6000_can_output_mi_thunk /* Return true if rs6000_output_mi_thunk would be able to output the assembler code for the thunk function specified by the arguments it is passed, and false otherwise. */ static bool rs6000_can_output_mi_thunk (const_tree, HOST_WIDE_INT, HOST_WIDE_INT, const_tree) { /* The only possible issue is for VxWorks in kernel mode. */ if (!TARGET_VXWORKS || TARGET_VXWORKS_RTP) return true; /* The loader neither creates the glue code sequence that loads r12 nor uses the local entry point for the sibcall's target in the ELFv2 ABI. */ return DEFAULT_ABI != ABI_ELFv2; } -- Eric Botcazou