Commit Graph

27360 Commits

Author SHA1 Message Date
Peter Wemm
9cb13c2344 First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.

This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc.  So for now, the support is pretty much dormant.

The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files).  The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.

The initial idea came from i386/osfrose.h which is a dual rose/elf format
target.  These two are not as diverse as a.out and elf it would seem.

The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores.  The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes.  This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)

The default format is a.out (still), nobody should see any major changes.

With both elf and a.out tools and libraries installed:

[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!

[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!

Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)

Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
KATO Takenori
d01df9f46d Sync with sys/i386/i386/machdep.c revision 1.292. 1998-03-08 03:55:35 +00:00
John Birrell
08d6f1187e Add sched_yield() witch is the draft 10 equivalent of pthread_yield()
from draft 4. Move some of the schedule definitions to sched.h which
is a POSIX header.
1998-03-08 02:37:27 +00:00
John Birrell
dc79e6f23b Add a POSIX sched header. pthread_yield() in draft 4 becomes
sched_yield() in the final draft (10). This header contains the
prototype. Other things in here are "future".
1998-03-08 02:17:26 +00:00
Bruce Evans
3d1442be99 Added forgotten new file for -Lfoo -lbar' -> foo/bar.a' change. 1998-03-08 00:19:19 +00:00
John Dyson
4d5459f794 Support a couple of new "-s" stats. 1998-03-07 23:40:23 +00:00
James Raynard
49ad8a1f2c Revert previous commit. Despite the names, these files contain
troff input, not C source.
1998-03-07 22:34:23 +00:00
Andrey A. Chernov
8a9f6ff89d Oops, merge back 32bit fat description from -stable.
It was added to -stable but not to -current, strange.
1998-03-07 22:00:31 +00:00
Andrey A. Chernov
9b0c02c058 Prevent passwd locking database forever waiting for user input
Submitted by: Antti Kaipila <anttik@iki.fi>
1998-03-07 21:42:07 +00:00
John Dyson
8f9110f6a1 This mega-commit is meant to fix numerous interrelated problems. There
has been some bitrot and incorrect assumptions in the vfs_bio code.  These
problems have manifest themselves worse on NFS type filesystems, but can
still affect local filesystems under certain circumstances.  Most of
the problems have involved mmap consistancy, and as a side-effect broke
the vfs.ioopt code.  This code might have been committed seperately, but
almost everything is interrelated.

1)	Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that
	are fully valid.
2)	Rather than deactivating erroneously read initial (header) pages in
	kern_exec, we now free them.
3)	Fix the rundown of non-VMIO buffers that are in an inconsistent
	(missing vp) state.
4)	Fix the disassociation of pages from buffers in brelse.  The previous
	code had rotted and was faulty in a couple of important circumstances.
5)	Remove a gratuitious buffer wakeup in vfs_vmio_release.
6)	Remove a crufty and currently unused cluster mechanism for VBLK
	files in vfs_bio_awrite.  When the code is functional, I'll add back
	a cleaner version.
7)	The page busy count wakeups assocated with the buffer cache usage were
	incorrectly cleaned up in a previous commit by me.  Revert to the
	original, correct version, but with a cleaner implementation.
8)	The cluster read code now tries to keep data associated with buffers
	more aggressively (without breaking the heuristics) when it is presumed
	that the read data (buffers) will be soon needed.
9)	Change to filesystem lockmgr locks so that they use LK_NOPAUSE.  The
	delay loop waiting is not useful for filesystem locks, due to the
	length of the time intervals.
10)	Correct and clean-up spec_getpages.
11)	Implement a fully functional nfs_getpages, nfs_putpages.
12)	Fix nfs_write so that modifications are coherent with the NFS data on
	the server disk (at least as well as NFS seems to allow.)
13)	Properly support MS_INVALIDATE on NFS.
14)	Properly pass down MS_INVALIDATE to lower levels of the VM code from
	vm_map_clean.
15)	Better support the notion of pages being busy but valid, so that
	fewer in-transit waits occur.  (use p->busy more for pageouts instead
	of PG_BUSY.)  Since the page is fully valid, it is still usable for
	reads.
16)	It is possible (in error) for cached pages to be busy.  Make the
	page allocation code handle that case correctly.  (It should probably
	be a printf or panic, but I want the system to handle coding errors
	robustly.  I'll probably add a printf.)
17)	Correct the design and usage of vm_page_sleep.  It didn't handle
	consistancy problems very well, so make the design a little less
	lofty.  After vm_page_sleep, if it ever blocked, it is still important
	to relookup the page (if the object generation count changed), and
	verify it's status (always.)
18)	In vm_pageout.c, vm_pageout_clean had rotted, so clean that up.
19)	Push the page busy for writes and VM_PROT_READ into vm_pageout_flush.
20)	Fix vm_pager_put_pages and it's descendents to support an int flag
	instead of a boolean, so that we can pass down the invalidate bit.
1998-03-07 21:37:31 +00:00
John Birrell
051b1b1a74 This commit was generated by cvs2svn to compensate for changes in r34204,
which included commits to RCS files with non-trunk default branches.
1998-03-07 21:27:49 +00:00
John Birrell
f2b7551c39 Import of the mpn asm source files for alpha from V2.0.2 which
appears to match the other libgmp files in the repository.
1998-03-07 21:27:49 +00:00
Tor Egge
1516126e28 Reenable redirection of clock interrupt to a higher priority vector.
setidt() now knows about f00f_hack(), and the APs now use the same
interrupt descriptor table as the BSP.
1998-03-07 20:48:16 +00:00
John Dyson
4866e0856c Make vm_fault much cleaner by removing the evil macro inlines, and
put alot of it's context into a data structure.  This allows
significant shortening of its codepath, and will significantly
decrease it's cache footprint.

Also, add some stats to vmmeter.  Note that you'll have to
rebuild/recompile vmstat, systat, etc... Otherwise, you'll
get "very interesting" paging stats.
1998-03-07 20:45:47 +00:00
John Polstra
f0a8e032c6 Enable csu/i386-elf under the appropriate conditions. 1998-03-07 20:30:18 +00:00
John Polstra
966a88d986 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00
Tor Egge
1146c3560f The APs now reload the interrupt descriptor table pointer after
f00f_hack has run.

Use the global r_idt descriptor in f00f_hack when in SMP mode,
so the APs find the relocated interrupt descriptor table.

Submitted by:	Partially from David A Adkins <adkin003@tc.umn.edu>
1998-03-07 20:16:49 +00:00
John Polstra
1ab7c6cc77 Add support for ELF.
Switch to ANSI-style function definitions.
1998-03-07 19:57:05 +00:00
John Polstra
59f198d1ff Enable rtld-elf when building an ELF system on the i386. 1998-03-07 19:43:48 +00:00
John Dyson
9b2e5bad34 Some kern_lock code improvements. Add missing wakeup, and enable
disabling some diagnostics when memory or speed is at a premium.
1998-03-07 19:25:34 +00:00
John Polstra
3124c3e093 Import the ELF dynamic linker. This is the ElfKit version with
quite a few enhancements and bug fixes.  There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 19:24:35 +00:00
Wolfram Schneider
32dcb97f3e Delete cc(1) debug option, typo from last commit.
Pointed out by: Søren Schmidt
1998-03-07 16:13:57 +00:00
KATO Takenori
0ea34c690a Sync with following changes:
>   Added files:
>     sys/i386/boot        Makefile.inc
>  Revision  Changes    Path
>  1.63      +3 -12     src/sys/i386/boot/biosboot/Makefile
>  1.8       +1 -17     src/sys/i386/boot/kzipboot/Makefile
>  1.16      +6 -15     src/sys/i386/boot/netboot/Makefile
>  1.10      +3 -14     src/sys/i386/boot/rawboot/Makefile
1998-03-07 15:48:29 +00:00
KATO Takenori
546c9ed396 Sync with sys/i386/isa/clock.c revision 1.115. 1998-03-07 15:43:43 +00:00
KATO Takenori
917d483199 Sync with sys/i386/i386/machdep.c revision 1.291. 1998-03-07 15:42:54 +00:00
Bruce Evans
0b8a3ff790 Set the input and output buffer sizes and the input buffer watermarks
dynamically depending on the line speed(s).  This should give the old
sizes and watermarks until drivers are changed.

Display the input watermarks in pstat and sicontrol.
1998-03-07 15:36:29 +00:00
Bruce Evans
16337c2efb Fixed missing simple_lock() in ffs_mountfs(). 1998-03-07 14:59:44 +00:00
Bruce Evans
a813856e54 Pass -nostdinc to mkdep for assembler and C files (it was already
passed for C++ files).

Don't pass -nostdlib to mkdep for C++ files.

Don't use temporary variables to obfuscate the main rule.
1998-03-07 13:57:37 +00:00
Bruce Evans
fcccc50b75 Fixed generation of extra dependencies:
- the two `_EXTRADEPEND::' targets potentially clobbered each other for
  `make -jN'.  In practice, the output for the second target sometimes
  disappeared.
- bogus dependencies were generated for static libraries.
1998-03-07 13:13:41 +00:00
Eivind Eklund
22263dd149 Make this handle -j<large>, and avoid .depend pointing at /usr/include. 1998-03-07 10:48:15 +00:00
Bruce Evans
b5f50e3158 Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
Override the default it it is wrong.

Don't override defaults when the defaults are correct.

Don't give absolute paths to man page sources.
1998-03-07 09:49:12 +00:00
Bruce Evans
06c779979a Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
Override the default it it is wrong.

Don't override defaults when the defaults are correct.
1998-03-07 09:48:14 +00:00
Bruce Evans
15d0bb0b98 Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
1998-03-07 09:46:17 +00:00
Bruce Evans
c516ab73b5 Reverted part of previous change and improved formatting. Switching
from `?=' to `=' for BINDIR was a mistake.  Sub-makefiles may need
to set BINDIR.
1998-03-07 09:06:09 +00:00
Jordan K. Hubbard
e8ec9207cc Documented moused flags.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1998-03-07 09:04:24 +00:00
Jordan K. Hubbard
7b60e55263 Add -I flag.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1998-03-07 09:03:43 +00:00
Jordan K. Hubbard
bb6531b760 New moused flag.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1998-03-07 09:02:08 +00:00
Jordan K. Hubbard
7f2c35c3f8 Add a mouse configuration menu.
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1998-03-07 08:59:32 +00:00
Bruce Evans
6dd8984675 Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries, so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.
1998-03-07 08:55:00 +00:00
Andrey A. Chernov
56b19102ab Add primary fat-32 1998-03-07 08:45:46 +00:00
John Birrell
36dbb7ddef Fix a #ifndef that became a #ifdef and changed the default
behaviour of rpcgen.

Noticed by: bde
1998-03-07 05:43:59 +00:00
Bill Paul
4e6ace0853 Fix resource allocation problems:
- Completely recoded the ypmatch cache code. The old code could leak
  memory: it would allow the cache to grow, but never
  shrink. The new code imposes the following limits:

	o The cache is capped at a limit of 5 entries.
	o Each entry expires after five seconds, at which point
	  its slot is freed.
	o If an insertion is to be done and all five slots
	  are filled, the oldest entry is forcibly expired
	  to release its slot.

  Also, the cache is implemented on a per-binding basis rather than
  having a global cache covering all bindings. This means that each
  bound domain has its own 5 slot cache.

- Changed clntudp_create() to clntudp_bufcreate() so that the
  xmit/recv message buffer sizes can be set explicitly. NIS transactions
  are rarely much larger than 1024 bytes since YPMAXRECORD is 1024.
  The defaults chosen by clntudb_create() are actually much larger
  than needed. I set the xmit buffer to a little over 1024 and the
  recv buffer to a little over 2048. This saves a few Kbytes for each
  NIS binding.

- Add my name to the copyright. I think I've made enough changes to
  this file to merit it. :)

Note: these changes should go into the 2.2.x branch, but I'm waiting
on feedback from a tester to see if the cache fixes solve the reported
memory leak problem.
1998-03-07 05:06:10 +00:00
Satoshi Asami
c89f86ce8f Add ${CXX} to list of variables passed in the environment when
invoking configure.

Submitted by:	obrien
1998-03-07 04:40:19 +00:00
Jordan K. Hubbard
5021430d41 DOH! Forgot a backslash. 1998-03-06 23:03:49 +00:00
Guido van Rooij
52ed3a5d65 Open temporary files with O_EXCL.
Obtained from:bugtraq
1998-03-06 19:00:26 +00:00
Bruce Evans
8199f5c431 Fixed existence test for secure sources (don't test for secure objects).
Fixed some formatting.
1998-03-06 16:05:18 +00:00
Bruce Evans
073065dcc7 Fixed `make -jN' for large N, as usual. 1998-03-06 15:02:45 +00:00
Bruce Evans
df3175a04b Fixed `make -jN' for large N, as usual. Too usual for yp programs. 1998-03-06 14:51:35 +00:00
Bruce Evans
8f15ebc49d Fixed `make -jN' for large N. version.h was missing from SRCS,
SRCS was disordered to work around the bug for plain `make', and
the version number was bumped twice by building two copies of
version.[ch] concurrently.
1998-03-06 14:47:53 +00:00
Bruce Evans
2f8bfc23cd Fixed `make -jN' for large N, as usual. 1998-03-06 14:40:42 +00:00