diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 03:01:54 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 03:01:54 +0000 |
commit | 786f473778ab7c7c53042ac7636c4e1699904965 (patch) | |
tree | b1804a6e2993daebb11a9a124680428f22d94f38 /libexec | |
parent | c40eb1df912be0089b4182c56570f89dc56af0a6 (diff) |
Teach mips64 to pass &_DYNAMIC to _dl_boot_bind()
mips64be testing by deraadt@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/boot.c | 4 | ||||
-rw-r--r-- | libexec/ld.so/mips64/ldasm.S | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libexec/ld.so/boot.c b/libexec/ld.so/boot.c index 3216bdffcc3..5adc7c13b99 100644 --- a/libexec/ld.so/boot.c +++ b/libexec/ld.so/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.9 2016/08/07 02:59:27 guenther Exp $ */ +/* $OpenBSD: boot.c,v 1.10 2016/08/07 03:01:53 guenther Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -129,7 +129,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) #if defined(__alpha__) dynp = (Elf_Dyn *)((long)_DYNAMIC); -#elif defined(__arm__) || defined(__i386__) || defined(__mips64__) +#elif defined(__arm__) || defined(__i386__) dynp = (Elf_Dyn *)((long)_DYNAMIC + loff); #else dynp = dynamicp; diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S index a3172abfb03..fa5e9eb7b58 100644 --- a/libexec/ld.so/mips64/ldasm.S +++ b/libexec/ld.so/mips64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.19 2016/05/07 19:05:23 guenther Exp $ */ +/* $OpenBSD: ldasm.S,v 1.20 2016/08/07 03:01:53 guenther Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -55,6 +55,8 @@ LEAF(_dl_start, FRAMESZ) /* Not really LEAF, but we simplify */ PTR_ADDU a0, sp, FRAMESZ # Where stack info is. PTR_ADDU a1, sp, 0 # Where fast AUX info will be. + LA a2, _DYNAMIC + PTR_ADDU a2, s0 # Where _DYNAMIC is LA t9, _dl_boot_bind PTR_ADDU t9, s0 jalr t9 # Relocate ourself. |