diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-25 14:31:26 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-25 14:31:26 +0000 |
commit | ac2318460ca6c2ea9f6cbff07bad22a5f502234d (patch) | |
tree | 22bb99067974540a58517b358f90f44e6e8e973b /sys | |
parent | d63c82a6ac162cf5ffe6c7e960eadbfd6cfeff71 (diff) | |
download | FreeBSD-src-ac2318460ca6c2ea9f6cbff07bad22a5f502234d.zip FreeBSD-src-ac2318460ca6c2ea9f6cbff07bad22a5f502234d.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/imgact_elf.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 1 | ||||
-rw-r--r-- | sys/sys/imgact.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 47e1f64..236894f 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -943,6 +943,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->auxargs = elf_auxargs; imgp->interpreted = 0; + imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; return (error); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 17a0ac6..ed22519 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -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; diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h index 86984f6..1d1e361 100644 --- a/sys/sys/imgact.h +++ b/sys/sys/imgact.h @@ -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 */ |