aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2017-07-16 12:59:00 -0400
committerJohn David Anglin <danglin@gcc.gnu.org>2017-07-16 12:59:00 -0400
commit1903b38c6599129d9c09d5cffc9ca7cbeb50b100 (patch)
treee3dc14dc7218c471639cfc6330e5ba448d32adb5 /sysdeps
parentce1917d0bf87f8d98c0891a85272c21bd0a46654 (diff)
downloadglibc-1903b38c6599129d9c09d5cffc9ca7cbeb50b100.tar
glibc-1903b38c6599129d9c09d5cffc9ca7cbeb50b100.tar.gz
glibc-1903b38c6599129d9c09d5cffc9ca7cbeb50b100.tar.bz2
glibc-1903b38c6599129d9c09d5cffc9ca7cbeb50b100.zip
Return to caller if dl_fixup fails to resolve callee on hppa.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/hppa/dl-trampoline.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S
index 856339bffe..f1294a931f 100644
--- a/sysdeps/hppa/dl-trampoline.S
+++ b/sysdeps/hppa/dl-trampoline.S
@@ -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