Roughly speaking, to use C ++ in the kernel, you must get rid of all the dependencies of the C ++ library at runtime, first of all, you must override new/delete and remove the exception handling (compiled with -fno-exceptions ). In fact, if 32-bit code works, these simple cases should already be resolved.
Just try compiling and loading the module. If you are lucky, there will be no communication errors, and you will have a good chance for the module to work (compared to the usual set of cross-platform issues, such as the size and alignment of the structure). If you do not, you will receive a list of undefined characters that will give you a hint about what should be implemented or worked out.
source share