Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2010 18:50:57 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r203215 - projects/ppc64/sys/powerpc/powerpc
Message-ID:  <201001301850.o0UIovGh077079@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sat Jan 30 18:50:57 2010
New Revision: 203215
URL: http://svn.freebsd.org/changeset/base/203215

Log:
  Really fix setting argc. This problem should be properly fixed in
  kern_exec.c, which incorrectly uses suword() instead of suword32() to set
  nargvstr, but I am afraid of breaking sparc64. This should be revisited
  before merging.
  
  With this change, all statically linked binaries appear to be working
  correctly -- I can even compile things with gcc!
  
  Discussed with:	Patrick Kerharo

Modified:
  projects/ppc64/sys/powerpc/powerpc/exec_machdep.c

Modified: projects/ppc64/sys/powerpc/powerpc/exec_machdep.c
==============================================================================
--- projects/ppc64/sys/powerpc/powerpc/exec_machdep.c	Sat Jan 30 18:45:10 2010	(r203214)
+++ projects/ppc64/sys/powerpc/powerpc/exec_machdep.c	Sat Jan 30 18:50:57 2010	(r203215)
@@ -524,7 +524,7 @@ exec_setregs(struct thread *td, u_long e
          * Emulate by setting the syscall return value cells. The
          * registers still have to be set for init's fork trampoline.
          */
-        td->td_retval[0] = arginfo.ps_nargvstr;
+        td->td_retval[0] = *((register_t *)(&arginfo.ps_nargvstr));
         td->td_retval[1] = (register_t)arginfo.ps_argvstr;
 	tf->fixreg[3] = *((register_t *)(&arginfo.ps_nargvstr));
 	tf->fixreg[4] = (register_t)arginfo.ps_argvstr;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001301850.o0UIovGh077079>