Deleted Added
full compact
imgact_gzip.c (100384) imgact_gzip.c (103767)
1/*
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
1/*
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
9 * $FreeBSD: head/sys/kern/imgact_gzip.c 100384 2002-07-20 02:56:12Z peter $
9 * $FreeBSD: head/sys/kern/imgact_gzip.c 103767 2002-09-21 22:07:17Z jake $
10 *
11 * This module handles execution of a.out files which have been run through
12 * "gzip". This saves diskspace, but wastes cpu-cycles and VM.
13 *
14 * TODO:
15 * text-segments should be made R/O after being filled
16 * is the vm-stuff safe ?
17 * should handle the entire header of gzip'ed stuff.

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

224 error = exec_extract_strings(gz->ip);
225 if (error) {
226 gz->where = __LINE__;
227 return (error);
228 }
229 /*
230 * Destroy old process VM and create a new one (with a new stack)
231 */
10 *
11 * This module handles execution of a.out files which have been run through
12 * "gzip". This saves diskspace, but wastes cpu-cycles and VM.
13 *
14 * TODO:
15 * text-segments should be made R/O after being filled
16 * is the vm-stuff safe ?
17 * should handle the entire header of gzip'ed stuff.

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

224 error = exec_extract_strings(gz->ip);
225 if (error) {
226 gz->where = __LINE__;
227 return (error);
228 }
229 /*
230 * Destroy old process VM and create a new one (with a new stack)
231 */
232 exec_new_vmspace(gz->ip, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS, USRSTACK);
232 exec_new_vmspace(gz->ip, &aout_sysvec);
233
234 vmspace = gz->ip->proc->p_vmspace;
235
236 vmaddr = gz->virtual_offset;
237
238 error = vm_mmap(&vmspace->vm_map,
239 &vmaddr,
240 gz->a_out.a_text + gz->a_out.a_data,

--- 145 unchanged lines hidden ---
233
234 vmspace = gz->ip->proc->p_vmspace;
235
236 vmaddr = gz->virtual_offset;
237
238 error = vm_mmap(&vmspace->vm_map,
239 &vmaddr,
240 gz->a_out.a_text + gz->a_out.a_data,

--- 145 unchanged lines hidden ---