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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to