Commit Graph

78 Commits

Author SHA1 Message Date
jdolecek
555659c55c there is single emul_irix now
use irix_n32_setregs for the IRIX n32 execsw entry
2002-11-30 13:19:37 +00:00
jdolecek
cee43b67cc add generic linux compat ELF copyargs function
this gives:
* linux sysconf(_SC_CLK_TCK) gives correct value for linux binaries (hz)
  even if hz != 100
* glibc gets proper information on real/effective uid and enables
  secure mode for suid binaries

g/c LINUX_COPYARGS_FUNCTION, replaced by linux ELF copyargs function
g/c alpha-specific linux ELF copyargs function and linux ELF defines
2002-11-13 15:16:27 +00:00
manu
530968e795 The kernel now builds with COMPAT_DARWIN. 2002-11-12 23:40:19 +00:00
jdolecek
4581b93651 Fix comments for #endif, to keep proper nesting and reflect reality.
Fixes kern/18162 by Roskens.
2002-09-04 06:34:21 +00:00
christos
fea7af3bbe - Implement passing AT_{R,E}{U,G}ID in the elf aux vector.
- Pass struct proc to copyargs
- fix svr4_copyargs functions
2002-08-26 21:07:38 +00:00
eeh
45a9507815 Native 32-bit and 32-bit emulation are mutually exclusive. We should not
even try to execute 32-bit binaries as native on a 64-bit kernel.
2002-05-31 00:52:20 +00:00
rafal
8fcad97302 Fix up linux a.out compat entry after move of emul-related sysctl handler
to struct emul.
2002-04-02 23:56:17 +00:00
jdolecek
ebd670f0bc move emulation-specific sysctl hook from struct execsw to struct emul,
where it belongs
2002-04-02 20:19:59 +00:00
jdolecek
943f2b4f8a make COMPAT_11 or COMPAT_12 imply EXEC_ELF_NOTELESSS
use #if for the execsw entries, to allow 'options EXEC_ELF_NOTELESS=0'
  to override this

This addresses kern/13520 and kern/14409 by Matthew Green.
2002-03-23 09:50:54 +00:00
jdolecek
083f26646d rename EXEC_ELF_CATCHALL to EXEC_ELF_NOTELESS 2002-03-23 09:40:55 +00:00
christos
195539260e emulation specific sysctls. 2002-03-20 00:27:25 +00:00
oki
075769476a Use /emul/pecoff as prefix to run PE/COFF binaries. 2002-03-18 07:11:06 +00:00
manu
89e46d8a99 Reworked the o32/n32 matching scheme. IRIX uses some e_flags in the ELF
header to distinguish between o32, n32 and n64 ABIs. We now use this.
This suppress the need of the mips_option test, which had some fake positive.
This also removes the mandatory ordering of n32 vs o32 in the exec switch
(exec_conf.c)
2002-02-21 21:53:00 +00:00
manu
4398be0cfc Added code to correctly match and launch o32 and n32 IRIX binaires (note that
there is n support yet in the kernel for running n32 binaries)
2002-01-07 22:07:37 +00:00
thorpej
21df9c4a6e Switch ELF emulations to ELF core files (except for netbsd32 and svr4-32). 2002-01-04 06:47:46 +00:00
thorpej
205c159f0e Make the coredump routine exec-format/emulation specific. Split
out traditional NetBSD coredump routines into core_netbsd.c and
netbsd32_core.c (for COMPAT_NETBSD32).
2001-12-08 00:35:25 +00:00
manu
9d2b93114a Updated comment about COMPAT_IRIX: we start working on o32 first... 2001-11-28 11:45:36 +00:00
manu
12c949a188 Added COMPAT_IRIX (being developped, not functionnal at that time) 2001-11-26 21:38:41 +00:00
lukem
adc783d537 add RCSIDs 2001-11-12 15:25:01 +00:00
jdolecek
ef8abe0767 Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
2001-09-18 19:36:32 +00:00
christos
32a9a52549 add mach/macho exec struct 2001-07-14 02:06:34 +00:00
jdolecek
3fd1ca0fc9 Do not include the ELF 'catch all' entry in execsw[] by default, which
used to make ELF binaries unmatched by any signature check to be run under
NetBSD 'emulation'. This causes problems like kern/12253.
The old behaviour is available with option EXEC_ELF_CATCHALL.
2001-06-19 17:58:41 +00:00
lukem
6cb5e77db5 remove use of gcc syntax for designated initialisers when initialising
unions `union_elem: ...', and use c99 syntax `.union_elem = ...' only
where necessary.
in this case, there's no need to tag elf_probe_func because that's the
first union element, and therefore, the implicit case. only specifically
mention ecoff_probe_func where necessary.

if we decide to not use this c99 feature for now, at least there's now
less stuff to rip out.
2001-05-15 02:00:12 +00:00
eeh
59c87936e0 Oops. Forgot to add this to execsw. Seems like SVR4 64 is not used much. 2001-03-03 01:46:04 +00:00
eeh
52af2be8e9 Add COMPAT_SVR4_32 entries. 2001-02-11 01:29:43 +00:00
mrg
d4dfeaf200 add sunos32 support. 2001-02-02 07:30:22 +00:00
jdolecek
5c6130a2b1 hum, use freebsd_setregs for FreeBSD ELF binaries (this bug was introduced with
the execsw[] changes)
2000-12-17 21:36:49 +00:00
jdolecek
0576f87ad3 add infrastructure to load emulations and their executable support dynamically
via LKM
2000-12-08 19:42:11 +00:00
scw
6afa06dad6 Add support for COMPAT_AOUT_M68K. 2000-12-02 20:44:09 +00:00
jdolecek
30760da04a no need to define emul_osf1, <compat/osf1/osf1_exec.h> defines it for us now
set execsw[] entrys' priority to appropriate values
2000-12-01 12:57:55 +00:00
thorpej
aa77dea4c2 No need to play silly name trickery when we know we're talking about
64-bit ELF binaries.
2000-11-28 21:58:12 +00:00
jdolecek
e650ecc818 prototype netbsd_elf64_probe() ifdef EXEC_ELF64, not for if !defined(EXEC_ELF32) 2000-11-27 18:04:32 +00:00
jdolecek
414f0ac116 netbsd32 emulation doesn't exec 64bit binaries 2000-11-27 17:21:22 +00:00
itojun
6c7e531e99 make COMPAT_OSF1 to compile. not tested (could someone review?). 2000-11-22 03:48:33 +00:00
jdolecek
baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
oki
41608c00a3 PE/COFF (Win32) compatible binary support (experimental).
It currentry supports only i386.
2000-06-09 22:38:56 +00:00
mycroft
9dcdff8f25 Add stubs for PE/COFF. 2000-06-04 16:26:11 +00:00
matt
2dd872c9b4 defopt COMPAT_VAX1K 2000-01-17 02:59:25 +00:00
msaitoh
da3eeac505 EXEC_COFF cleanup 2000-01-02 13:39:49 +00:00
eeh
7aeaf762e5 Move netbsd32_exec BEFORE normal 32-bit exec so 32-bit binaries are not executed
on 64-bit kernels without emulation mode.
1999-12-30 15:57:31 +00:00
kleink
522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
itojun
65363da25e Merge in NetBSD/sh3 from cvs.kame.net repository.
Tree structure:
- sys/arch/sh3: sh3 generic code
	As commented, in-chip device drivers are put into sys/arch/sh3/dev.
- sys/arch/evbsh3: sh3 evaluation boards (pure sh3 CPU, no fancy external HW)
- sys/arch/mmeye: Brains mmEye, www.brains.co.jp
MI source code includes couple of #ifdef for sh3-coff support.
(sh3 uses coff or elf)

Needs some more improvements, especialy in sys/arch/sh3/conf/files.sh3,
to compile the tree (due to last minute tree structure change).
1999-09-13 10:30:21 +00:00
eeh
69d1f9d0d3 COMPAT_SPARC32 -> COMPAT_NETBSD32 1999-03-26 04:29:20 +00:00
kleink
51be278873 Defopt COMPAT_M68K4K. 1999-03-09 21:02:38 +00:00
christos
88162a0fe9 Make this compile without EXEC_AOUT and with COMPAT_FREEBSD 1999-02-23 18:19:29 +00:00
christos
be58edf2b6 Add compat_aout bit. 1999-02-11 09:35:21 +00:00
christos
10b5900f45 update for linux file move. 1998-10-03 20:39:32 +00:00
erh
a0480f4f57 Only include linux a.out makecmds if EXEC_AOUT is defined. 1998-10-01 15:55:34 +00:00
mrg
a2dad2e1a3 err, add sparc32_exec here. must forgot it. 1998-08-31 02:46:22 +00:00
ragge
b3574d3923 VAX logical page size increased to 4k. 1998-08-21 13:41:09 +00:00