From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 21:13:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C61A1065672; Wed, 24 Mar 2010 21:13:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D43E78FC18; Wed, 24 Mar 2010 21:13:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 86B1246B32; Wed, 24 Mar 2010 17:13:07 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 81B528A027; Wed, 24 Mar 2010 17:13:06 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 24 Mar 2010 16:38:01 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <4BAA658B.6080509@freebsd.org> In-Reply-To: <4BAA658B.6080509@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003241638.01330.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 24 Mar 2010 17:13:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Nathan Whitehorn Subject: Re: Review/testing request: changing the arguments of exec_setregs() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 21:13:08 -0000 On Wednesday 24 March 2010 3:18:35 pm Nathan Whitehorn wrote: > In order to properly implement exec_setregs() on powerpc64, I must > hand-relocate the function descriptor pointed to by the executable entry > point. To do this, exec_setregs() must be passed the relocation base of > the executable, which would originally come from the image_params struct. > > The patch at http://people.freebsd.org/~nwhitehorn/exec_setregs.diff > changes the arguments of exec_setregs to take a pointer to the image's > image_params struct to allow easy future expansion, and removes > redundant arguments (entry and ps_strings). This is similar to the > calling convention in NetBSD. I also take the opportunity to convert > several of the declarations of exec_setregs() from K&R to ANSI C. > > This patch is fairly straightforward, but it does touch all > architectures. I have tested the patch on amd64, sparc64, and powerpc, > with no evident problems. Looks fine to me, I say go for it. -- John Baldwin