From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 20:18:42 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 E6612106566C for ; Wed, 24 Mar 2010 20:18:42 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id BDE228FC14 for ; Wed, 24 Mar 2010 20:18:42 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0KZS0071OWB39F00@smtpauth3.wiscmail.wisc.edu> for freebsd-hackers@freebsd.org; Wed, 24 Mar 2010 14:18:39 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.69.218]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0KZS001PYWB0P380@smtpauth3.wiscmail.wisc.edu> for freebsd-hackers@freebsd.org; Wed, 24 Mar 2010 14:18:37 -0500 (CDT) Date: Wed, 24 Mar 2010 14:18:35 -0500 From: Nathan Whitehorn To: freebsd-hackers@freebsd.org Message-id: <4BAA658B.6080509@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.69.218 X-Spam-PmxInfo: Server=avs-10, Version=5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.3.24.190636, SenderIP=76.210.69.218 User-Agent: Thunderbird 2.0.0.24 (X11/20100320) Subject: 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 20:18:43 -0000 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. -Nathan