Skip to content
Commit ab2cceea authored by Alan Modra's avatar Alan Modra Committed by ryanarn
Browse files

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.
parent 9cb11a4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment