about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/ppc-mcount.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/ppc-mcount.S')
-rw-r--r--sysdeps/powerpc/powerpc64/ppc-mcount.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/ppc-mcount.S b/sysdeps/powerpc/powerpc64/ppc-mcount.S
index 8312f46644..693621104a 100644
--- a/sysdeps/powerpc/powerpc64/ppc-mcount.S
+++ b/sysdeps/powerpc/powerpc64/ppc-mcount.S
@@ -24,13 +24,15 @@
 ENTRY(_mcount)
 	mflr		 r4
 	ld		 r11, 0(r1)
+	std		 r4, FRAME_LR_SAVE(r1)
 	stdu		 r1,-FRAME_MIN_SIZE(r1)
 	cfi_adjust_cfa_offset (FRAME_MIN_SIZE)
-	std		 r4, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
 	cfi_offset (lr, FRAME_LR_SAVE)
 	ld		 r3, FRAME_LR_SAVE(r11)
 	bl		 JUMPTARGET(__mcount_internal)
+#ifndef SHARED
 	nop
+#endif
 	ld		 r0, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
 	mtlr		 r0
 	addi		 r1,r1,FRAME_MIN_SIZE