svn commit: r205643 - in head/sys: kern sys
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Mar 25 14:31:27 UTC 2010
Author: nwhitehorn
Date: Thu Mar 25 14:31:26 2010
New Revision: 205643
URL: http://svn.freebsd.org/changeset/base/205643
Log:
Add the ELF relocation base to struct image_params. This will be
required to correctly relocate the executable entry point's function
descriptor on powerpc64.
Modified:
head/sys/kern/imgact_elf.c
head/sys/kern/kern_exec.c
head/sys/sys/imgact.h
Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c Thu Mar 25 14:24:00 2010 (r205642)
+++ head/sys/kern/imgact_elf.c Thu Mar 25 14:31:26 2010 (r205643)
@@ -943,6 +943,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i
imgp->auxargs = elf_auxargs;
imgp->interpreted = 0;
+ imgp->reloc_base = addr;
imgp->proc->p_osrel = osrel;
return (error);
Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c Thu Mar 25 14:24:00 2010 (r205642)
+++ head/sys/kern/kern_exec.c Thu Mar 25 14:31:26 2010 (r205643)
@@ -372,6 +372,7 @@ do_execve(td, args, mac_p)
imgp->execlabel = NULL;
imgp->attr = &attr;
imgp->entry_addr = 0;
+ imgp->reloc_base = 0;
imgp->vmspace_destroyed = 0;
imgp->interpreted = 0;
imgp->opened = 0;
Modified: head/sys/sys/imgact.h
==============================================================================
--- head/sys/sys/imgact.h Thu Mar 25 14:24:00 2010 (r205642)
+++ head/sys/sys/imgact.h Thu Mar 25 14:31:26 2010 (r205643)
@@ -56,6 +56,7 @@ struct image_params {
struct vattr *attr; /* attributes of file */
const char *image_header; /* head of file to exec */
unsigned long entry_addr; /* entry address of target executable */
+ unsigned long reloc_base; /* load address of image */
char vmspace_destroyed; /* flag - we've blown away original vm space */
char interpreted; /* flag - this executable is interpreted */
char opened; /* flag - we have opened executable vnode */
More information about the svn-src-head
mailing list