Consider removing the initcall logic from module.rs, use codegen instead (original) (raw)

Currently we duplicate a bit of logic on the Rust side for our initcall handling.

Consider performing codegen instead to be able to reuse the C macros instead. This is basically the approach we took in rust/exports.c too. Even if may look ugly, it is best to avoid redoing parts of the C infrastructure.

This would also remove our need for the unstable global_asm!.