Fix profiling on powerpc32 secure-plt shared libs and PIEs
This patch moves the ppc32 _mcount to libc_shared.a, fixing a long-standing bug with profiling of secure-plt shared libraries and PIEs. The problem is that a ppc32 PIC PLT call stub uses r30 (GOT pointer) to load the function address from the PLT, r30 being set up in the function prologue, but _mcount is called before the function prologue. So chances are good that r30 will be pointing to the executable GOT when trying to call _mcount in a shared lib function. A similar problem can occur in a PIE if a shared lib calls a function in the executable.
Loading
Please register or sign in to comment