alpha already calculates &_DYNAMIC for the _reloc_alpha_got() call, so
authorguenther <guenther@openbsd.org>
Sun, 7 Aug 2016 02:34:52 +0000 (02:34 +0000)
committerguenther <guenther@openbsd.org>
Sun, 7 Aug 2016 02:34:52 +0000 (02:34 +0000)
save that and pass it to _dl_boot_bind() too

lib/csu/alpha/md_init.h
lib/csu/boot.h

index 1f1ad3d..19cd9d9 100644 (file)
@@ -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.
        "       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" \
index 88aee95..878b15c 100644 (file)
@@ -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;