Commit Graph

2568 Commits

Author SHA1 Message Date
tron
96ece1f13e Fix namespace collision caused by recent change to "linux_machdep.h". 2002-12-06 10:51:27 +00:00
scw
f88b19a600 Avoid strict-alias warnings. 2002-12-06 09:57:58 +00:00
junyoung
9104ddf809 Fix compile error. 2002-12-06 03:37:19 +00:00
christos
ef042d8e23 add a linux_rt_sigframe to support SA_SIGINFO, and use it when SA_SIGINFO
is requested. This appears to be how linuxthreads decides which signal handler
to use.
2002-12-06 00:02:59 +00:00
manu
f0332ec923 In load_shared_file, do zero-fill uninitialized data segments that
explicitely request to be zero filled.
2002-12-05 22:48:53 +00:00
manu
56b9df9869 Improved mach_vm_map emulation: take into account proection, alignement,
and improve debug messages.
2002-12-04 22:55:11 +00:00
agc
35a5ff86d4 Make this compile in the presence of -Werror 2002-12-01 11:02:11 +00:00
jdolecek
e1e0ff678b move ELF-specific items from irix_exec.c to irix_exec_elf32.c
merge the two emul_irix structures; the only difference was
  setregs function, which can be handled by exec-specific setregs hook
rename setregs_n32() to irix_n32_setregs(), and make it suitable
  as the exec-specific setregs hook
make irix_check_exec() a macro now that just single compare
2002-11-30 13:18:13 +00:00
jdolecek
6826135dbc make LKM friendlier by only including opt_* #ifdef _KERNEL_OPT 2002-11-30 12:28:26 +00:00
jdolecek
c9710a72e0 Get the dynamic interpreter location using emul_find_interp(), so that
it checks both the alternative/emul tree, and the non-emul tree.
This makes it possible to run chrooted emulated binaries without need
to setup shadow /emul tree within the chroot hierarchy.

XXX sligh code rearrangement was necessary, change not tested
2002-11-29 19:40:14 +00:00
jdolecek
da2945cc37 add comment why this doesn't need to use emul_find_interp() 2002-11-29 19:35:25 +00:00
jdolecek
1bf46cc0f0 use emul_find_interp(), rathern than calling emul_find() second time
with prefix set to "/"
XXX not tested
2002-11-29 19:15:15 +00:00
jdolecek
47cd9b85d6 Get the dynamic interpreter location using emul_find_interp(), so that
it checks both the alternative/emul tree, and the non-emul tree.
This makes it possible to run chrooted emulated binaries without need
to setup shadow /emul tree within the chroot hierarchy.
Only tested for COMPAT_LINUX, changes to other compat modules were
mechanical.
Fixes kern/19161 by Christian Groessler.
2002-11-29 19:13:14 +00:00
manu
ae748e840c Implement timebase_info. We don't know exactly what it should do yet... 2002-11-29 17:08:16 +00:00
jdolecek
302af6f02e add emul_find_interp() function: the function looks for interpreter
in alternative emul tree first, and updates interpreter pathname
if found there; if not found in alternative emul tree, pathname
without the emul prefix is checked, and error returned if the file
doesn't exist
2002-11-29 17:08:06 +00:00
jdolecek
b99fe89374 de-__P() 2002-11-29 16:32:50 +00:00
fvdl
6df30bca4f Patch that actually works for previous, from Jaromir Dolecek. 2002-11-29 14:32:27 +00:00
manu
f47b85037b Added a few kern sysctl which are the same on Darwin and NetBSD. 2002-11-29 13:18:09 +00:00
manu
65adabf7aa Filter the flag bits we get from Darwin's sigaction when giving them to
our native sigaction beacause unknown bits cause sigaction to fail with EINVAL.
2002-11-29 13:17:22 +00:00
itojun
02185dab0f setsockopt(IPPROTO_IPV6, IPV6_V6ONLY, 0) for AF_INET6 sockets,
to meet with the default behavior of linux.
review: fvdl/christos
XXX interactions with net.inet6.ip6.v6only?
2002-11-29 01:34:55 +00:00
itojun
e2a7bfda88 minor KNF (indent) 2002-11-28 23:46:15 +00:00
manu
de5d0b9706 Remove __P 2002-11-28 21:23:54 +00:00
manu
0f239dc026 Check for alternate receive buffer for mach_msg_overwrite_trap
Check for target buffer length, and fail if it is too short
Move mach_msg_trap and mach_msg_overwrite_trap to their own file
Remove some useless debug messages now we have ktrace
Remove __P()
2002-11-28 21:21:32 +00:00
jdolecek
b3b1ed9f7d back previous off, it makes the probe function mistaken some linux
binaries as freebsd
problem reported in thread 'installing suse_base on current
i386 sets time to 1970' on current-users
2002-11-28 15:08:36 +00:00
atatat
7caa308c63 Complete the rename: s/sa_/<compat>_sa_/g
Also tweak the darwin siginfo stuff to avoid the same type of collision.
2002-11-27 16:44:01 +00:00
tron
7ef75ab314 Fix namespace clash caused by addition of sigaction(2). 2002-11-27 14:36:12 +00:00
manu
dfa96ff4b3 Add signal delivery for the PowerPC. Everything is implemented except siginfo.
The stack layout is observed from stack dumps on Darwin, so it should be
very accurate.
2002-11-26 23:54:09 +00:00
lukem
0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos
116bcb05d0 rename: s/sa_/<compat>sa/g 2002-11-26 18:43:20 +00:00
christos
daa59d8957 rename sa_ -> linux_sa_
first attempt at providing siginfo_t to the signal handler.
2002-11-26 18:42:38 +00:00
manu
6ce9cf3a84 regen 2002-11-26 08:10:58 +00:00
manu
11aa9ca2f6 Add thread_policy and clock_get_time mach traps. Implement
mach_sys_clock_sleep_trap. This makes sleep(3) emulation working.
2002-11-26 08:10:14 +00:00
manu
bd9d3fb902 There are functions to convert between sigaction and sigaction13. Use them. 2002-11-26 00:05:41 +00:00
manu
29a7621173 regen 2002-11-25 22:26:21 +00:00
manu
53356d6169 Added an empty shell for signal delivery. Now we just have to fill the
machine dependant bits.
2002-11-25 22:25:12 +00:00
schmonz
aee43321d1 Report ourselves as Linux 2.4.18 on powerpc, too. 2002-11-25 10:34:34 +00:00
thorpej
d32a923263 Avoid strict-alias warnings. 2002-11-25 02:31:14 +00:00
thorpej
c8f5c657b5 Add ULL to a 64-bit integer constant. 2002-11-25 02:11:23 +00:00
manu
5bdd9578e4 Better vm_allocate emulation. 2002-11-24 17:22:59 +00:00
manu
1aaacd96d2 Give a second chance when vm_allocate fail, by finding another free region.
Seems to fix some problems.
2002-11-24 11:49:36 +00:00
wiz
ad774d9d77 Fix stack alignment; uses same alignment as COMPAT_LINUX.
Found by manu.
2002-11-23 17:35:06 +00:00
manu
1ee1245718 Add support for two Darwin sysctl 2002-11-23 02:18:53 +00:00
manu
af59b63bbd We now have the exact stack initial stack layout of Darwin:
macho_hdr, argc, *argv, NULL, *envp, NULL, progname, NULL,
*progname, **argv, **envp

Where progname is a pointer to the program name as given in the first
argument to execve(), and macho_hdr a pointer to the Mach-O header at
the beginning of the executable file.
2002-11-21 19:53:40 +00:00
jdolecek
2ca4879bd1 g/c also mips-specific linux ELF copyargs function prototype and
linux ELF defines, use generic Aux32Info instead
this also adresses kern/19047 by FUKAUMI Naoki
2002-11-21 15:32:32 +00:00
jdolecek
0a624a0c15 back previous off; port can only supply LINUX_ELF_AUX_ENTRIES if it also
overrides the ELF copyargs function
2002-11-21 15:20:28 +00:00
jdolecek
3590104898 g/c local definition of LINUX_ELF_AUX_ENTRIES 2002-11-21 15:18:37 +00:00
manu
1af0fa979f Better immitate Darwin startup stack layout: there is a slot for the program
name after envp, and the 0x1000 at the beginning is a pointer to the binary
mach header (we don't emulate this correctly yet).
2002-11-20 23:54:39 +00:00
manu
a0d341067e Added host_info(PRIORITY_INFO) 2002-11-20 07:17:11 +00:00
christos
733d2a038f Make the OSABI and the branding optional. Tested by Ben Collver, thanks. 2002-11-19 22:38:07 +00:00
christos
63e4ec4bd7 implement mach_insert_port_right() 2002-11-19 19:54:07 +00:00