This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20554] ld: bss-plt forced due to /usr/lib/libc_nonshared.a(ppc-mcount.oS)
- From: "schwab at linux-m68k dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 04 Oct 2016 18:01:45 +0000
- Subject: [Bug libc/20554] ld: bss-plt forced due to /usr/lib/libc_nonshared.a(ppc-mcount.oS)
- Auto-submitted: auto-generated
- References: <bug-20554-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20554
--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
But it breaks restoring of lr.
diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S
b/sysdeps/powerpc/powerpc32/ppc-mcount.S
index 62c1bc452c..1d36b91243 100644
--- a/sysdeps/powerpc/powerpc32/ppc-mcount.S
+++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S
@@ -41,11 +41,13 @@
ENTRY(_mcount)
#if defined PIC && !defined SHARED
+# define CALLER_LR_OFFSET 68
stwu r1,-64(r1)
cfi_adjust_cfa_offset (64)
stw r30, 48(r1)
cfi_rel_offset (r30, 48)
#else
+# define CALLER_LR_OFFSET 52
stwu r1,-48(r1)
cfi_adjust_cfa_offset (48)
#endif
@@ -62,7 +64,7 @@ ENTRY(_mcount)
addis r30, r30, _GLOBAL_OFFSET_TABLE_-0b@ha
addi r30, r30, _GLOBAL_OFFSET_TABLE_-0b@l
#endif
- lwz r3, 52(r1)
+ lwz r3, CALLER_LR_OFFSET(r1)
mfcr r5
stw r7, 28(r1)
stw r8, 32(r1)
@@ -85,7 +87,7 @@ ENTRY(_mcount)
mtcrf 0xff,r6
lwz r5, 20(r1)
lwz r6, 24(r1)
- lwz r0, 52(r1)
+ lwz r0, CALLER_LR_OFFSET(r1)
lwz r7, 28(r1)
lwz r8, 32(r1)
mtlr r0
--
You are receiving this mail because:
You are on the CC list for the bug.