Review/testing request: changing the arguments of exec_setregs()

Nathan Whitehorn nwhitehorn at freebsd.org
Wed Mar 24 20:18:43 UTC 2010


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


More information about the freebsd-hackers mailing list