⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.mod.c

📁 刚学LINUX驱动模块时写的一个测试程序
💻 C
字号:
#include <linux/module.h>#include <linux/vermagic.h>#include <linux/compiler.h>MODULE_INFO(vermagic, VERMAGIC_STRING);#undef unixstruct module __this_module__attribute__((section(".gnu.linkonce.this_module"))) = { .name = __stringify(KBUILD_MODNAME), .init = init_module,#ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module,#endif};static const struct modversion_info ____versions[]__attribute_used____attribute__((section("__versions"))) = {	{ 0x6d134bc3, "struct_module" },	{ 0xc192d491, "unregister_chrdev" },	{ 0xbc6becb4, "register_chrdev" },	{ 0xb2fd5ceb, "__put_user_4" },	{ 0x1d26aa98, "sprintf" },	{ 0xa03d6a57, "__get_user_4" },	{ 0x1b7d4074, "printk" },};static const char __module_depends[]__attribute_used____attribute__((section(".modinfo"))) ="depends=";MODULE_INFO(srcversion, "B830316A8950260155F4A1A");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -