This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/20554] ld: bss-plt forced due to /usr/lib/libc_nonshared.a(ppc-mcount.oS)


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]