- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* * * * * * * * Module Versioning 427 428 Module versioning is enabled by the CONFIG_MODVERSIONS tag, and is used 429 as a simple ABI consistency check. A CRC value of the full prototype 430 for an exported symbol is created. When a module is loaded/used, the 431 CRC values contained in the kernel are compared with similar values in 432 the module; if they are not equal, the kernel refuses to load the 433 module. 434 435 Module.symvers contains a list of all exported symbols from a kernel 436 build. 437 438 --- 6.1 Symbols From the Kernel (vmlinux + modules) 439 440 During a kernel build, a file named Module.symvers will be 441 generated. Module.symvers contains all exported symbols from 442 the kernel and compiled modules. For each symbol, the 443 corresponding CRC value is also stored. 444 445 The syntax of the Module.symvers file is: 446 CRC Symbol module 447 448 0x2d036834 scsi_remove_host drivers/scsi/scsi_mod 449 450 For a kernel build without CONFIG_MODVERSIONS enabled, the CRC 451 would read 0 452 453 Module.symvers serves two purposes: 454 1) It lists all exported symbols from vmlinux and all modules. 455 2) It lists the CRC if CONFIG_MODVERSIONS is enabled. 456 457 --- 6.2 Symbols and External Modules 458 459 When building an external module, the build system needs access 460 to the symbols from the kernel to check if all external symbols 461 are defined. This is done in the MODPOST step. modpost obtains 462 the symbols by reading Module.symvers from the kernel source 463 tree. If a Module.symvers file is present in the directory 464 where the external module is being built, this file will be 465 read too. During the MODPOST step, a new Module.symvers file 466 will be written containing all exported symbols that were not 467 defined in the kernel. 468 469 --- 6.3 Symbols From Another External Module 470 471 Sometimes, an external module uses exported symbols from 472 another external module. kbui
文档评论(0)