diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 02:44:01 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 02:44:01 +0000 |
commit | 4afa0461684e681f896472f08de948c28af537de (patch) | |
tree | f01f2032c7f48157c666fc1c87dd2e02fccfc76c /lib/csu | |
parent | d8149b67d42648fb0881ad725570e3b66e6df993 (diff) |
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind().
mips64be testing by deraadt@
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/boot.h | 7 | ||||
-rw-r--r-- | lib/csu/mips64/md_init.h | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/csu/boot.h b/lib/csu/boot.h index 878b15c2027..c0a541f76e6 100644 --- a/lib/csu/boot.h +++ b/lib/csu/boot.h @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.h,v 1.20 2016/08/07 02:34:52 guenther Exp $ */ +/* $OpenBSD: boot.h,v 1.21 2016/08/07 02:44:00 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -145,12 +145,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) * Scan the DYNAMIC section for the loader. * Cache the data for easier access. */ - -#if defined(__mips64__) - dynp = (Elf_Dyn *)((long)_DYNAMIC + loff); -#else dynp = dynamicp; -#endif _dl_memset(&dynld, 0, sizeof(dynld)); while (dynp->d_tag != DT_NULL) { diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index c0c614cea22..30c78cf7baa 100644 --- a/lib/csu/mips64/md_init.h +++ b/lib/csu/mips64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.13 2016/03/20 02:32:39 guenther Exp $ */ +/* $OpenBSD: md_init.h,v 1.14 2016/08/07 02:44:00 guenther Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -124,6 +124,8 @@ " dsubu $s0, $ra, $s1 \n" \ " daddu $a0, $sp, 160 \n" \ " daddu $a1, $sp, 0 \n" \ + " dla $a2, _DYNAMIC \n" \ + " daddu $a2, $s0 \n" \ " dla $t9, _dl_boot_bind \n" \ " daddu $t9, $s0 \n" \ " jalr $t9 \n" \ |