darling-xnu/libkern/kmod
2023-05-16 21:41:14 -07:00
..
libkmod.xcodeproj Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
libkmodtest Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
c_start.c Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
c_stop.c Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
cplus_start.c Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
cplus_stop.c Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00
README Upload xnu-7195.141.2 Source 2023-05-16 21:41:14 -07:00

#
# 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
#