]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Return to caller if dl_fixup fails to resolve callee on hppa.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 16 Jul 2017 16:59:00 +0000 (12:59 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sun, 16 Jul 2017 16:59:00 +0000 (12:59 -0400)
ChangeLog
sysdeps/hppa/dl-trampoline.S

index 03e9ee0e68654f0c5f50d2929372a0f818e7a9ea..4e3d106fefad338d9be48fdf2e1b2244b9a965ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-07-16  John David Anglin  <danglin@gcc.gnu.org>
 
+       * sysdeps/hppa/dl-trampoline.S (_dl_runtime_resolve): Return to caller
+       if _dl_fixup fails.
+
        * sysdeps/unix/sysv/linux/hppa/clone.S (__clone): Add .cfi annotation.
        * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Likewise.
        * sysdeps/unix/sysv/linux/hppa/pt-vfork.S (__vfork): Likewise.
index 856339bffe1c62d299b2d2c343fe8e2e0fcf4f58..f1294a931fa71ab1381c1f946f43259fe47b5ded 100644 (file)
@@ -82,6 +82,11 @@ _dl_runtime_resolve:
        bl      _dl_fixup,%rp
        copy    %r21,%r19               /* set fixup func ltp */
 
+       /* Sometimes a final executable may attempt to call an undefined
+          weak function (e.g., __gmon_start__).  Return if the function
+          was not resolved by _dl_fixup */
+       comib,= 0,%r28,1f
+
        /* Load up the returned func descriptor */
        copy    %r28, %r22
        copy    %r29, %r19
@@ -107,6 +112,13 @@ _dl_runtime_resolve:
        /* Jump to new function, but return to previous function */
        bv      %r0(%r22)
        ldw     -20(%sp),%rp
+
+1:
+       /* Return to previous function */
+       ldw     -148(%sp),%rp
+       bv      %r0(%rp)
+       ldo     -128(%sp),%sp
+
         .EXIT
         .PROCEND
        cfi_endproc