// SPDX-License-Identifier: GPL-2.01/*2* A hack to export Rust symbols for loadable modules without having to redo3* the entire `include/linux/export.h` logic in Rust.4*5* This requires Rust's new/future `v0` mangling scheme because the default one6* ("legacy") uses invalid characters for C identifiers (thus we cannot use the7* `EXPORT_SYMBOL_*` macros).8*9* All symbols are exported as GPL-only to guarantee no GPL-only feature is10* accidentally exposed.11*/1213#include <linux/export.h>1415#define EXPORT_SYMBOL_RUST_GPL(sym) extern int sym; EXPORT_SYMBOL_GPL(sym)1617#include "exports_core_generated.h"18#include "exports_helpers_generated.h"19#include "exports_bindings_generated.h"20#include "exports_kernel_generated.h"2122// For modules using `rust/build_error.rs`.23#ifdef CONFIG_RUST_BUILD_ASSERT_ALLOW24EXPORT_SYMBOL_RUST_GPL(rust_build_error);25#endif262728