Deleted Added
full compact
imgact_linux.c (144501) imgact_linux.c (166944)
1/*-
2 * Copyright (c) 1994-1996 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Based heavily on /sys/kern/imgact_aout.c which is:
6 * Copyright (c) 1993, David Greenman
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1994-1996 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Based heavily on /sys/kern/imgact_aout.c which is:
6 * Copyright (c) 1993, David Greenman
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/i386/linux/imgact_linux.c 144501 2005-04-01 20:00:11Z jhb $");
33__FBSDID("$FreeBSD: head/sys/i386/linux/imgact_linux.c 166944 2007-02-24 16:49:25Z netchild $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/exec.h>
38#include <sys/imgact.h>
39#include <sys/imgact_aout.h>
40#include <sys/kernel.h>
41#include <sys/lock.h>

--- 77 unchanged lines hidden (view full) ---

119 /*
120 * Destroy old process VM and create a new one (with a new stack)
121 */
122 exec_new_vmspace(imgp, &linux_sysvec);
123 vmspace = imgp->proc->p_vmspace;
124
125 /*
126 * Check if file_offset page aligned,.
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/exec.h>
38#include <sys/imgact.h>
39#include <sys/imgact_aout.h>
40#include <sys/kernel.h>
41#include <sys/lock.h>

--- 77 unchanged lines hidden (view full) ---

119 /*
120 * Destroy old process VM and create a new one (with a new stack)
121 */
122 exec_new_vmspace(imgp, &linux_sysvec);
123 vmspace = imgp->proc->p_vmspace;
124
125 /*
126 * Check if file_offset page aligned,.
127 * Currently we cannot handle misalinged file offsets,
127 * Currently we cannot handle misaligned file offsets,
128 * and so we read in the entire image (what a waste).
129 */
130 if (file_offset & PAGE_MASK) {
131#ifdef DEBUG
132 printf("imgact: Non page aligned binary %lu\n", file_offset);
133#endif
134 /*
135 * Map text+data+bss read/write/execute

--- 110 unchanged lines hidden ---
128 * and so we read in the entire image (what a waste).
129 */
130 if (file_offset & PAGE_MASK) {
131#ifdef DEBUG
132 printf("imgact: Non page aligned binary %lu\n", file_offset);
133#endif
134 /*
135 * Map text+data+bss read/write/execute

--- 110 unchanged lines hidden ---