Commit Graph

115 Commits

Author SHA1 Message Date
dsl b8fbaf8c4b Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
2007-04-22 08:29:55 +00:00
christos 36534cb271 move USE_SSP=no one level up. 2006-11-11 22:38:38 +00:00
christos 31b7f8ae5f Don't build lkms with SSP for now. 2006-11-11 21:35:45 +00:00
xtraeme 94e721817e Back out linux_ptrace.c changes, looks like they were removed with
a reason in the past.
2006-09-25 10:55:54 +00:00
xtraeme 8de009a612 linux_ptrace.c is not available in all archs, only in powerpc, arm,
mips and i386... make it so.

Patch from Kurt Schreiner.
2006-09-25 10:36:23 +00:00
xtraeme 2e6b13ae04 PR 34478: "modload compat_linux.o fail" by Takehiko NOZAKI.
Applied patch, thanks.
2006-09-24 14:35:22 +00:00
tron 595808ad47 Don't build "linux_ptrace.c" anymore. ptrace(2) support is optional now
and we can't tell for the LKM whether the kernel supports it or not.
2006-08-31 14:00:29 +00:00
tron 3a715a0a6f Don't build "freebsd_ptrace.c" anymore. ptrace(2) support is optional now
and we can't tell for the LKM whether the kernel supports it or not.
2006-08-31 13:25:50 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
rpaulo 6459ccf2df Add freebsd_sysctl.c 2005-09-02 14:34:53 +00:00
rpaulo 5530080d86 Add freebsd_sched.c 2005-09-02 13:34:46 +00:00
thorpej 5821e751d0 Use TOOL_GENASSYM. 2005-05-30 18:33:15 +00:00
dogcow f652e348df With the move of linux_trap.c from sys/arch/i386/i386/ to sys/arch/x86/x86,
it's no longer in .PATH; add $S/arch/x86/x86 inside the i386 .if.
2005-05-16 07:48:07 +00:00
christos b4e68c8648 PR/29630: Takehiko NOZAKI: undefined symbols 'linux_ioctl_mtio'
in /usr/lkm/compat_linux.o
2005-03-08 15:26:23 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
jmc 9b1c35ec87 Fixes from PR#29289. Need linux_sg.c in here now as well 2005-02-10 17:37:35 +00:00
oki 50d1aadd13 kill __P. 2005-01-22 01:36:59 +00:00
he e1ca5516de Remove reference to now-deleted aoutm68k_ioctl.c. 2004-09-16 09:35:38 +00:00
thorpej 483ec9af85 Remove the COMPAT_AOUT LKM build infrastructure. The code is gone,
now.
2004-09-14 22:12:06 +00:00
he 936dfb04a0 More removal of references to aoutm68k_syscalls.c, following that file's
removal.  Allows our m68k ports to build again.
2004-09-12 08:04:50 +00:00
atatat 10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
christos b51967d220 add -DCOMPAT_NETBSD32 so that it builds. 2003-10-16 15:59:01 +00:00
christos 74e287ff04 Add more compat options until this builds. 2003-10-16 15:57:12 +00:00
tron d08125d839 Wrap overlong lines, fix indentation. 2003-09-12 14:06:48 +00:00
christos b3fcf8836e newed -DCOMPAT_IBCS2 now. 2003-09-12 13:01:57 +00:00
christos 654fd674fb add the SYSV compat flags needed. 2003-09-12 02:08:35 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
jdolecek 4ecc3047b1 also rewrite emul_find_interp() calls to include the ${COMPAT_UTIL_OVERRIDE}
prefix
2003-04-22 17:23:20 +00:00
dsl b7c921ed3d The IDT is an array of struct gate_descriptor. 2003-03-04 10:39:10 +00:00
matt 3b768ce056 PPC_MPC6XX is now PPC_OEA 2003-02-06 22:23:11 +00:00
jdolecek fdb9be22e1 add basic framework to build compat_irix LKM
the LKM is not likely to actually do anything useful, but this is good
to quickly check compat/irix is buildable
2002-11-30 13:41:40 +00:00
jdolecek 8ad945a36b add freebsd_fork.c 2002-11-28 21:55:48 +00:00
lha f882e535ec deal with the .s -> .S change for i386 2002-11-23 02:15:45 +00:00
fvdl b3e87c44a4 Adjust callers to setgate() to match new prototype. 2002-10-06 10:40:04 +00:00
thorpej 8e9b95428b Revert rev. 1.10 of Makefile and fix the problem properly by adding
-D_KERNEL -D_LKM to AFLAGS in Makefile.common.
2002-06-02 23:46:49 +00:00
itojun 3ec91458b1 not sure if it is right, but svr4_sigcode.s does not compile on i386 without it.
PR 17121
2002-06-01 20:13:42 +00:00
jdolecek ff2064e0c8 make compat_linux LKM buildable on macppc 2002-05-19 18:18:36 +00:00
mycroft baf701415e Fix a file name. 2002-04-10 04:21:27 +00:00
mycroft bdfc53717b Fix SRCS so this compiles again. 2002-04-10 04:12:42 +00:00
enami 101714165d Now linux_sigarray.c is included by newly created linux_signo.c. 2002-04-01 06:54:55 +00:00
kent d469e9cf08 Use compat_util with overriding. 2002-03-29 17:09:30 +00:00
kent 2260d0eb5d Copy syscall entries for SYSVSHM to syncronize kernel option. 2002-03-27 20:54:29 +00:00
kent 9392b84ff9 Introduce a new LKM `compat_pecoff'
Add it to SUBDIR.

To enable PECOFF, do the following:
	# modload /usr/lkm/compat_pecoff.o
	*then*
	# modload /usr/lkm/exec_pecoff.o
2002-03-25 06:52:41 +00:00
fvdl 99d2b6e3ef Add linux_sysctl.c 2002-02-23 16:46:03 +00:00
is 372cac3316 The linux lkm doesn't compile anymore on m68k 2002-02-16 11:02:37 +00:00
mrg 42aa4bc31d use MACHINE_ARCH for sparc & sparc64. 2002-02-10 16:25:35 +00:00
mrg d3fc678205 look in sys/arch/${MACHINE}/${MACHINE} as well as ${MACHINE_ARCH} 2002-02-10 15:43:41 +00:00
mrg 1b9f6c7a2e build svr4_sigcode.s on sparc 2002-02-10 15:42:57 +00:00
mrg cf5b2d8368 build sunos_machdep.c and sunos_sigcode.s on sparc & sparc64 2002-02-10 15:41:58 +00:00