Commit Graph

203 Commits

Author SHA1 Message Date
Peter Wemm
f41325db5f With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible.  <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set.  They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated.  This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by:	eivind
2001-06-13 10:58:39 +00:00
Matt Jacob
fe95b46491 track the One True Architecture (i386) 2001-05-25 20:33:06 +00:00
Mark Murray
fb919e4d5a Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
Andrew Gallatin
9a44dfa794 Regen after adding linux_sched_get_priority_max() and
linux_sched_get_priority_min()
2001-04-03 18:01:41 +00:00
Andrew Gallatin
a7f70675e9 Add linux_sched_get_priority_max() and linux_sched_get_priority_min() to
alpha md code & unbreak kernel build
2001-04-03 17:58:44 +00:00
John Baldwin
0fb8828fe2 - Call fork1() directly instead of calling rfork() so that it doesn't mask
out RFSTOPPED.
- Lock the child process when settings p_sigparent instead of locking the
  parent.

Pointy-hat to:	me
2001-03-11 23:41:55 +00:00
John Baldwin
6ad0e7c5cc Create clone'd linux processes as stopped processes at first and don't
actually make them runnable until after the emulator layer has had a chance
to perform fixups.
2001-03-06 02:59:46 +00:00
Andrew Gallatin
9ccd73f2ee Add MODULE_DEPEND() for the sysvipc modules. This allows the linulator
to load when sysvipc is not in the kernel

Reported by: naddy@mips.inka.de (Christian Weisgerber)
2001-03-05 17:59:18 +00:00
Andrew Gallatin
d905e2f482 sync with i386:
MFS: bring the consistent `compat_3_brand' support

This should fix the linux-related panics reported
by naddy@mips.inka.de (Christian Weisgerber)

Forgotten by: obrien
2001-03-05 17:56:58 +00:00
Andrew Gallatin
8859907478 Regen 2001-02-20 03:48:53 +00:00
Andrew Gallatin
c9eeb59a01 Sort out the umount breakage introduced in the last 2 revisions.
Please note:
When committing changes to this file, it is important to note that
linux is not freebsd -- their system call numbers (and sometimes names)
are different on different platforms.  When in doubt (and you always need
to be) check the arch-specific unistd.h and entry.S files in the linux
kernel sources to see what the syscall numbers really are.
2001-02-20 03:47:59 +00:00
Jonathan Lemon
203e686755 Regenerate. 2001-02-20 02:16:38 +00:00
Jonathan Lemon
6de4a7300a Fix duplicate linux_mount definition 2001-02-20 02:16:07 +00:00
Jonathan Lemon
2459336973 Allow debugging output to be controlled on a per-syscall granularity.
Also clean up debugging output in a slightly more uniform fashion.

The default behavior remains the same (all debugging output is turned on)
2001-02-16 16:40:43 +00:00
Jonathan Lemon
a25f3493bc Re-gen auto generated files. 2001-02-16 14:47:24 +00:00
Jonathan Lemon
3417b54986 Remove dummy stub functions. 2001-02-16 14:46:16 +00:00
Jonathan Lemon
705deb78a3 Add mount syscall to linux emulation. Also improve emulation of reboot. 2001-02-16 14:42:11 +00:00
John Baldwin
60bb997eb3 Proc locking. 2001-01-24 10:27:11 +00:00
Marcel Moolenaar
e5f2ced1ee Minor cleanups:
o  remove unused prototypes,
o  remove unused extern declarations,
o  move prototypes up.
2000-12-05 09:06:41 +00:00
Marcel Moolenaar
b4c6727a3a Don't auto-generate the syscalls. 2000-12-03 01:30:31 +00:00
Marcel Moolenaar
a7e693e3a0 Don't auto-generate syscalls. 2000-12-03 01:28:51 +00:00
Marcel Moolenaar
466b14d758 Don't unregister the ioctl handlers before we verified we
can unload. Doing so leaves the linuxulator in a crippled
state (no ioctl support) when Linux binaries are run at
unload time.

While here, consistently spell ELF in capitals and perform
some minor style improvements.

ELF spelling submitted by: asmodai
2000-11-23 03:21:58 +00:00
Andrew Gallatin
930a65fe47 Use the linux_connect() on alpha rather than passing directly through
to our native connect().  This is required to deal with the differences
in the way linux handles connects on non-blocking sockets.

This gets the private beta of the Compaq Linux/alpha JDK working
on FreeBSD/alpha

Approved by: marcel
2000-11-16 01:05:53 +00:00
Andrew Gallatin
e652fd8417 make the fcntl() flags match what the linux/alpha port uses, not
what linux/i386 uses
2000-11-16 00:58:07 +00:00
Andrew Gallatin
922683e01a Enable linux thread support on the alpha. The guts of linux_clone was
mainly cut-n-pasted from the i386 port, except for the method of setting
the child's stack which is the only MD part of this function.

I've tested with the example apps shipped with the linux threads source
code (ex1-ex6) and with several binary builds of Mozilla.
2000-11-10 23:04:31 +00:00
Marcel Moolenaar
806d7daafe Make MINSIGSTKSZ machine dependent, and have the sigaltstack
syscall compare against a variable sv_minsigstksz in struct
sysentvec as to properly take the size of the machine- and
ABI dependent struct sigframe into account.

The SVR4 and iBCS2 modules continue to have a minsigstksz of
8192 to preserve behavior. The real values (if different) are
not known at this time. Other ABI modules use the real
values.

The native MINSIGSTKSZ is now defined as follows:

Arch		MINSIGSTKSZ
----		-----------
alpha		    4096
i386		    2048
ia64		   12288

Reviewed by: mjacob
Suggested by: bde
2000-11-09 08:25:48 +00:00
Andrew Gallatin
3598c2665c back out 1.66 -- the Elfxx_Brandinfo compat_3_brand field doesn't exist
in -current
2000-11-09 01:53:05 +00:00
David E. O'Brien
66e7b133fe Fix generated include path.
Approved by:	JKH
2000-11-04 07:21:37 +00:00
David E. O'Brien
43cc92233d Fix the Elf64 branding initialization. 2000-11-04 05:04:47 +00:00
David E. O'Brien
896fc61a66 Sort. 2000-11-02 04:13:51 +00:00
Andrew Gallatin
f11610e091 Support for the linux ipc syscalls on the alpha, where each one has
its own syscall rather than going through a demux function like
linux_ipc() on i386
2000-11-01 23:17:31 +00:00
Andrew Gallatin
d0ce99c874 use DUMMY macro and support from linux_util.h 2000-11-01 23:13:49 +00:00
Andrew Gallatin
b36abb04e5 Move the linux abi's alpha md files over to using David's build-time
syscall generation method
2000-11-01 23:07:25 +00:00
Andrew Gallatin
e70ce4d9c5 fix linux_termio and linux_termios structs on alpha. alpha differences
are in the termios struct (probably because linux wants to be compatible
with the osf/1 termios struct), not the termio struct.
2000-11-01 22:36:41 +00:00
David E. O'Brien
ac4c54948c Apply style(9). 2000-11-01 16:38:40 +00:00
David E. O'Brien
7b4cc3fd44 Minimal set of diffs from the i386 bits to the AlphaLinux.
(based on a patch to sys/i386/linux/linux_dummy.c by gallatin)
2000-11-01 16:34:16 +00:00
David E. O'Brien
23d3a6fe6e Need to dummy-out rt_sigreturn.
submitted by:	gallatin
2000-11-01 08:52:24 +00:00
David E. O'Brien
60f618a04d Need to include sys/proc.h. 2000-11-01 08:49:48 +00:00
David E. O'Brien
727fba5373 I don't know why this used to compile for me, but now struct
linux_sigcontext seems to have changed and some members are gone.
2000-11-01 08:48:53 +00:00
David E. O'Brien
83d2913008 Make the target a little bit more generic. 2000-11-01 08:47:34 +00:00
David E. O'Brien
45428438f7 Apply style(9). [best I could] 2000-10-23 08:46:25 +00:00
David E. O'Brien
e413f7bf97 Apply style(9).
(best I could)
2000-10-23 08:36:59 +00:00
David E. O'Brien
30e3f60f75 Sort the #define's. 2000-10-23 08:29:04 +00:00
David E. O'Brien
683713f8e9 Minimal set of diffs from the i386 bits to the AlphaLinux. 2000-10-23 08:15:58 +00:00
David E. O'Brien
d1121275d5 Re-order the #define's into a more logical one. 2000-10-23 08:13:19 +00:00
David E. O'Brien
2159c8905f We need to explicitly tell the args struct for COMPAT functions we use
that use the same args struct as their non-COMPAT counter parts.
2000-10-23 02:20:01 +00:00
David E. O'Brien
b608e3ff66 Somehow I left out sycall #98 2000-10-22 21:47:07 +00:00
David E. O'Brien
dd3ccfd92e Minor whitespace cleanup. 2000-10-22 21:42:03 +00:00
David E. O'Brien
8c2c12607a Minimal set of diffs from the i386 bits to the AlphaLinux.
Submitted by:	gallatin (content, minimization by me)
2000-10-22 21:36:27 +00:00
Andrew Gallatin
7936339495 A start at an implemention of linux_rt_sendsig & linux_rt_sigreturn
and associated user-level signal trampoline glue.

Without this patch, an SA_SIGINFO style handler can be installed by a linux
app, but if the handler accesses its sip argument, it will get a garbage
pointer and likely segfault.

We currently supply a valid pointer, but its contents are mainly
garbage.  Filling this in properly is future work.

This is the second of 3 commits that will get IBM's JDK 1.3 working with
FreeBSD ...
2000-10-17 00:00:20 +00:00