This was recently noticed and reported via GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78095 " > (Powerpc) > <li>GCC now diagnoses inline assembly that clobbers register r2. > This has always been invalid code, and is no longer quietly > tolerated.</li> " Reproducible: Always Actual Results: Errors reported in several spots, including: m_debuglog.c: In function 'vgPlain_debugLog': m_debuglog.c:228:4: error: PIC register clobbered by 'r2' in 'asm' __asm__ volatile ( ^~~~~~~ ### and In file included from ../include/pub_tool_clreq.h:34:0, from pub_core_clreq.h:38, from vg_preloaded.c:46: vg_preloaded.c: In function '_vgnU_ifunc_wrapper': ../include/valgrind.h:3292:7: error: PIC register clobbered by 'r2' in 'asm' __asm__ volatile( \ ^ vg_preloaded.c:104:5: note: in expansion of macro 'CALL_FN_W_v' CALL_FN_W_v(result, fn); ^~~~~~~~~~~
Created attachment 101860 [details] proposed patch Proposed patch. Remove "r2" from the __CALLER_SAVED_REGS for ppc64 and ppc64le. Remove "r2" from the clobber list associated with functions local_sys_write_stderr and local_sys_getpid.
*** This bug has been marked as a duplicate of bug 376729 ***