1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
The lib can be compiled five different ways for Linux-8086 standard,
Linux-8086 with 'First arg in AX', MS-DOS, BCC-386 or for GNU-386. At
the moment the 386 versions are missing some _very_ important bits.
This can be done by running.
make PLATFORM=i86-FAST clean all
make PLATFORM=i86-DOS clean all
an so on.
SYSTEM CALLS
The system call table (syscalls/syscall.dat) is constantly changing, using
skewed versions is _very_ likely to give you segfaults and strange behaviour.
For this lib you should use the same version of elksemu.
The system call table will only be frozen when the linux-86 kernel is
running and reasonably stable.
THE COMPILER
You should use the versions of bcc, unproto, as86, ld86 and elksemu that
are in this version of the combined development environment. Some other
versions will work but often they'll just appear to work or not work at
all. The standard bcc-cc1 won't pickup the right header files, the
standard ld86 won't generate COM files and looks in the wrong place for
crt0.o and libc.a.
Main Subdirectories.
bcc Lots of BCC helper functions
error The C error functions.
grp Routines for /etc/group, from Nat
include Some include files, some new others Glib or Glib hacked.
kinclude Kernel include files, here for now.
malloc1 My malloc routines
malloc2 Joel's malloc routines
misc Various larger functions
msdos This is the equlivent of the syscall directory for msdos.
pwd Routines for /etc/passwd, from Nat
regexp Standard regular expression parser
stdio1 Joel's standard I/O functions - as yet rather incomplete
stdio2 My standard I/O
string The functions for string.h
syscall All the system call functions, and a few tied lib ones.
termios Termimal mode control.
utmp /etc/utmp updating
tests Various C programs used to test the lib.
Directory structure:
The top Makefile will try to call any "Makefile" it finds in a
subdirectory, so to add a new chunk to "libc.a" just drop in
the directory a Makefile that understands "make clean" and
"make libc.a" (Which must also update ../libc.a)
There's now a tiny script (New_subdir) that'll do this.
Make config will look in all subdirectories for a file 'Config'
any it finds will be displayed and can be used to switch a directory
on or off.
The exit(rv) function is already defined. It will call the contents
of the function pointer (*__cleanup)() before it calls _exit();
This pointer should be used through the 'atexit' or 'on_exit' lib
functions. (See standard man pages)
If you need to call something before main see the file 'Pre_main'.
-Robert
-=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-
|