summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-08-07 02:34:53 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-08-07 02:34:53 +0000
commitd8149b67d42648fb0881ad725570e3b66e6df993 (patch)
treeb52c98bcf2a4582a0b75d9c9884be2f254ffda5d /lib
parentab1f969fbfd326e67461d21a90649455853d1669 (diff)
alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, so
save that and pass it to _dl_boot_bind() too
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/alpha/md_init.h5
-rw-r--r--lib/csu/boot.h6
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/csu/alpha/md_init.h b/lib/csu/alpha/md_init.h
index 1f1ad3d0df6..19cd9d92397 100644
--- a/lib/csu/alpha/md_init.h
+++ b/lib/csu/alpha/md_init.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md_init.h,v 1.6 2016/03/20 02:32:39 guenther Exp $ */
+/* $OpenBSD: md_init.h,v 1.7 2016/08/07 02:34:52 guenther Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
* All rights reserved.
@@ -85,12 +85,13 @@
" mov $11, $17 \n" \
" lda $6, _DYNAMIC \n" \
" addq $11, $6, $16 \n" \
+ " mov $16, $15 \n" \
" bsr $26, _reloc_alpha_got \n" \
" lda $sp, -80($sp) \n" \
" mov $9, $16 \n" \
" lda $11, 0($sp) \n" \
" mov $11, $17 \n" \
- " mov 0, $18 \n" \
+ " mov $15, $18 \n" \
" jsr $26, _dl_boot_bind \n" \
" ldgp $gp, 0($26) \n" \
" mov $9, $16 \n" \
diff --git a/lib/csu/boot.h b/lib/csu/boot.h
index 88aee9556af..878b15c2027 100644
--- a/lib/csu/boot.h
+++ b/lib/csu/boot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.h,v 1.19 2016/08/07 02:30:55 guenther Exp $ */
+/* $OpenBSD: boot.h,v 1.20 2016/08/07 02:34:52 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -146,9 +146,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp)
* Cache the data for easier access.
*/
-#if defined(__alpha__)
- dynp = (Elf_Dyn *)((long)_DYNAMIC);
-#elif defined(__mips64__)
+#if defined(__mips64__)
dynp = (Elf_Dyn *)((long)_DYNAMIC + loff);
#else
dynp = dynamicp;