Deleted Added
full compact
ia32_sysvec.c (118031) ia32_sysvec.c (119334)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 2003 Peter Wemm
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 2003 Peter Wemm
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/compat/ia32/ia32_sysvec.c 118031 2003-07-25 21:19:19Z obrien $");
29__FBSDID("$FreeBSD: head/sys/compat/ia32/ia32_sysvec.c 119334 2003-08-22 23:19:02Z peter $");
30
31#include "opt_compat.h"
32
33#define __ELF_WORD_SIZE 32
34
35#include <sys/param.h>
36#include <sys/exec.h>
37#include <sys/fcntl.h>

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

74#include <machine/md_var.h>
75#include <machine/pcb.h>
76#include <machine/cpufunc.h>
77
78static register_t *ia32_copyout_strings(struct image_params *imgp);
79static void ia32_setregs(struct thread *td, u_long entry, u_long stack,
80 u_long ps_strings);
81
30
31#include "opt_compat.h"
32
33#define __ELF_WORD_SIZE 32
34
35#include <sys/param.h>
36#include <sys/exec.h>
37#include <sys/fcntl.h>

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

74#include <machine/md_var.h>
75#include <machine/pcb.h>
76#include <machine/cpufunc.h>
77
78static register_t *ia32_copyout_strings(struct image_params *imgp);
79static void ia32_setregs(struct thread *td, u_long entry, u_long stack,
80 u_long ps_strings);
81
82extern struct sysent ia32_sysent[];
82extern struct sysent freebsd32_sysent[];
83
84struct sysentvec ia32_freebsd_sysvec = {
85 SYS_MAXSYSCALL,
83
84struct sysentvec ia32_freebsd_sysvec = {
85 SYS_MAXSYSCALL,
86 ia32_sysent,
86 freebsd32_sysent,
87 0,
88 0,
89 NULL,
90 0,
91 NULL,
92 NULL,
93 elf32_freebsd_fixup,
94 ia32_sendsig,

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

119 "/usr/libexec/ld-elf.so.1",
120 &ia32_freebsd_sysvec
121 };
122
123SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
124 (sysinit_cfunc_t) elf32_insert_brand_entry,
125 &ia32_brand_info);
126
87 0,
88 0,
89 NULL,
90 0,
91 NULL,
92 NULL,
93 elf32_freebsd_fixup,
94 ia32_sendsig,

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

119 "/usr/libexec/ld-elf.so.1",
120 &ia32_freebsd_sysvec
121 };
122
123SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
124 (sysinit_cfunc_t) elf32_insert_brand_entry,
125 &ia32_brand_info);
126
127extern int _ucode32sel, _udatasel;
128
127/* XXX may be freebsd32 MI */
129static register_t *
130ia32_copyout_strings(struct image_params *imgp)
131{
132 int argc, envc;
133 u_int32_t *vectp;
134 char *stringp, *destp;
135 u_int32_t *stack_base;
136 struct ia32_ps_strings *arginfo;

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

227 /* end of vector table is a null pointer */
228 suword32(vectp, 0);
229
230 return ((register_t *)stack_base);
231}
232
233/*
234 * Clear registers on exec
128static register_t *
129ia32_copyout_strings(struct image_params *imgp)
130{
131 int argc, envc;
132 u_int32_t *vectp;
133 char *stringp, *destp;
134 u_int32_t *stack_base;
135 struct ia32_ps_strings *arginfo;

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

226 /* end of vector table is a null pointer */
227 suword32(vectp, 0);
228
229 return ((register_t *)stack_base);
230}
231
232/*
233 * Clear registers on exec
234 * XXX backend MD
235 */
235 */
236extern int _ucode32sel, _udatasel;
236void
237ia32_setregs(td, entry, stack, ps_strings)
238 struct thread *td;
239 u_long entry;
240 u_long stack;
241 u_long ps_strings;
242{
243 struct trapframe *regs = td->td_frame;

--- 40 unchanged lines hidden ---
237void
238ia32_setregs(td, entry, stack, ps_strings)
239 struct thread *td;
240 u_long entry;
241 u_long stack;
242 u_long ps_strings;
243{
244 struct trapframe *regs = td->td_frame;

--- 40 unchanged lines hidden ---