forked from apple/darwin-xnu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
28 lines (28 loc) · 1.26 KB
/
README
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
#
# Subtle combination of files and libraries make up the C++ runtime system for
# kernel modules. We are dependant on the KernelModule kmod.make and
# CreateKModInfo.perl scripts to be exactly instep with both this library
# module and the libkmod module as well.
#
# If you do any maintenance on any of the following files make sure great
# care is taken to keep them in Sync.
# extenTools/KernelModule.bproj/kmod.make
# extenTools/KernelModule.bproj/CreateKModInfo.perl
# IOKitUser/kmodc++/pure.c
# IOKitUser/kmodc++/cplus_start.c
# IOKitUser/kmodc++/cplus_start.c
# IOKitUser/kmodc/c_start.c
# IOKitUser/kmodc/c_stop.c
#
# The trick is that the linkline links all of the developers modules.
# If any static constructors are used .constructors_used will be left as
# an undefined symbol. This symbol is exported by the cplus_start.c routine
# which automatically brings in the appropriate C++ _start routine. However
# the actual _start symbol is only required by the kmod_info structure that
# is created and initialized by the CreateKModInfo.perl script. If no C++
# was used the _start will be an undefined symbol that is finally satisfied
# by the c_start module in the kmod library.
#
# The linkline must look like this.
# *.o -lkmodc++ kmod_info.o -lkmod
#