【发布时间】:2013-07-29 03:16:41
【问题描述】:
在所有可加载的内核模块中,当给定make 时,除了modulename.ko 之外,它还会生成一个名为modulename.mod.c 的文件。
以下代码摘录来自 .mod.c 文件,其中包含 {number, function} 对。
这个数字有什么意义?这个数字是编译器如何生成的?
static const struct modversion_info ____versions[]
__used
__attribute__((section("__versions"))) = {
{ 0xa6d8dcb5, "module_layout" },
{ 0x16c2b958, "register_netdevice" },
{ 0x609f1c7e, "synchronize_net" },
{ 0x90a60c63, "kmem_cache_destroy" },
{ 0x402b8281, "__request_module" },
{ 0x844a8af7, "netdev_info" },
{ 0xdfdb0ee8, "kmalloc_caches" },
{ 0x12da5bb2, "__kmalloc" },
{ 0x92d42843, "cfg80211_cqm_rssi_notify" },
{ 0xc86289e8, "perf_tp_event" },
...
...
}
【问题讨论】: