);
let item = quote! {
#cfg
- #[doc(hidden)]
#[cfg_attr(not(target_os = "macos"), link_section = ".modinfo")]
#[used(compiler)]
pub static #counter: [u8; #length] = *#string;
}
// Double nested modules, since then nobody can access the public items inside.
+ #[doc(hidden)]
mod __module_init {
mod __module_init {
use pin_init::PinInit;
// This may be best done another way later on, e.g. as a new modinfo
// key or a new section. For the moment, keep it simple.
#[cfg(MODULE)]
- #[doc(hidden)]
#[used(compiler)]
static __IS_RUST_MODULE: () = ();
/// This function must not be called after module initialization, because it may be
/// freed after that completes.
#[cfg(MODULE)]
- #[doc(hidden)]
#[no_mangle]
#[link_section = ".init.text"]
pub unsafe extern "C" fn init_module() -> ::kernel::ffi::c_int {
}
#[cfg(MODULE)]
- #[doc(hidden)]
#[used(compiler)]
#[link_section = ".init.data"]
static __UNIQUE_ID___addressable_init_module: unsafe extern "C" fn() -> i32 =
init_module;
#[cfg(MODULE)]
- #[doc(hidden)]
#[no_mangle]
#[link_section = ".exit.text"]
pub extern "C" fn cleanup_module() {
}
#[cfg(MODULE)]
- #[doc(hidden)]
#[used(compiler)]
#[link_section = ".exit.data"]
static __UNIQUE_ID___addressable_cleanup_module: extern "C" fn() = cleanup_module;
// and the identifiers need to be unique.
#[cfg(not(MODULE))]
#[cfg(not(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS))]
- #[doc(hidden)]
#[link_section = #initcall_section]
#[used(compiler)]
pub static #ident_initcall: extern "C" fn() ->
::core::arch::global_asm!(#global_asm);
#[cfg(not(MODULE))]
- #[doc(hidden)]
#[no_mangle]
pub extern "C" fn #ident_init() -> ::kernel::ffi::c_int {
// SAFETY: This function is inaccessible to the outside due to the double
}
#[cfg(not(MODULE))]
- #[doc(hidden)]
#[no_mangle]
pub extern "C" fn #ident_exit() {
// SAFETY: