Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/netbsd32 Push AT_STACKBASE. Otherwise, pthread_at...



details:   https://anonhg.NetBSD.org/src/rev/538429441869
branches:  trunk
changeset: 449199:538429441869
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Feb 26 06:28:43 2019 +0000

description:
Push AT_STACKBASE. Otherwise, pthread_attr_getstack(3) cannot
find the stack address for initial thread (LID 1).

Now, rust for i386 and armv7 work on amd64 and aarch64,
respectively.

diffstat:

 sys/compat/netbsd32/netbsd32_exec_elf32.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 70a20b64de5d -r 538429441869 sys/compat/netbsd32/netbsd32_exec_elf32.c
--- a/sys/compat/netbsd32/netbsd32_exec_elf32.c Tue Feb 26 06:15:55 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_exec_elf32.c Tue Feb 26 06:28:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_exec_elf32.c,v 1.41 2019/01/27 02:08:40 pgoyette Exp $        */
+/*     $NetBSD: netbsd32_exec_elf32.c,v 1.42 2019/02/26 06:28:43 rin Exp $     */
 /*     from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.41 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.42 2019/02/26 06:28:43 rin Exp $");
 
 #define        ELFSIZE         32
 
@@ -196,6 +196,10 @@
                a->a_v = kauth_cred_getgid(l->l_cred);
                a++;
 
+               a->a_type = AT_STACKBASE;
+               a->a_v = l->l_proc->p_stackbase;
+               a++;
+
                exec_free_emul_arg(pack);
        }
 



Home | Main Index | Thread Index | Old Index