Date: Thu, 25 Mar 1999 10:44:06 -0800 (PST) From: John Polstra <jdp@polstra.com> To: dg@root.com Cc: current@freebsd.org Subject: Re: latest -current doesn't execute BSDI-binary bladeenc Message-ID: <199903251844.KAA03085@vashon.polstra.com> In-Reply-To: <199903170258.SAA01200@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <199903170258.SAA01200@implode.root.com>, David Greenman <dg@root.com> wrote: > A much better solution would be for someone to spend the time to > implement the needed VM frobbing of modifying, at BSDI binary exec-time, > the ps_strings address constant in the binary's crt0 that is causing the > problem. Is that the only issue as far as the kernel is concerned? If so, there's an easy solution. If %ebx is nonzero on entry to a BSD/OS executable, it is taken to be the ps_strings constant. Otherwise a hard-coded value is used. So all we have to do is arrange for %ebx to have the right value on entry to the program. It looks easy to fix. Add a new member to struct image_params for the ps_strings value, and set it in the various image activators. It should be "PS_STRINGS" (from <sys/exec.h>) for a BSD/OS binary (a_midmag == 0314), and 0 for all others. Then in kern_exec.c:execve(), pass the value to setregs() as a new parameter. Stuff it into %ebx in i386/machdep.c:setregs(), and ignore it for the other architectures. That should do it. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903251844.KAA03085>