函数逻辑报告 |
Source Code:kernel\module.c |
Create Date:2022-07-27 11:59:02 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Lay out the SHF_ALLOC sections in a way not dissimilar to how ldmight -- code, read-only data, read-write data, small data. Tallysizes, and place the offsets into sh_entsize fields: high bit means itbelongs in init.
函数原型:static void layout_sections(struct module *mod, struct load_info *info)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct module * | mod | |
struct load_info * | info |
2422 | static unsigned long const masks[][2] = {{SHF_EXECINSTR | SHF_ALLOC, ARCH_SHF_SMALL}, {SHF_ALLOC, sh_flags | ARCH_SHF_SMALL}, {SHF_RO_AFTER_INIT | SHF_ALLOC, ARCH_SHF_SMALL}, {sh_flags | SHF_ALLOC, ARCH_SHF_SMALL}, {ARCH_SHF_SMALL | SHF_ALLOC, 0}} |
2434 | 以i小于e_shnum循环sh_entsize等于0UL的反 |
2437 | pr_debug("Core section allocation order:\n") |
2441 | sname等于secstrings加sh_name |
2443 | 如果sh_flags按位与masks[m][0]的值不等于masks[m][0]或sh_flags按位与masks[m][1]或sh_entsize不等于0UL的反或strstarts - does @str start with @prefix?*@str: string to examine*@prefix: prefix to look for.则继续下一循环 |
2453 | Total size. 等于debug_align( Total size. ) |
2455 | 退出 |
2457 | Total size. 等于debug_align( Total size. ) |
2459 | 退出 |
2461 | Total size. 等于debug_align( Total size. ) |
2463 | 退出 |
2465 | Total size. 等于debug_align( Total size. ) |
2466 | 退出 |
2470 | pr_debug("Init section allocation order:\n") |
2474 | sname等于secstrings加sh_name |
2476 | 如果sh_flags按位与masks[m][0]的值不等于masks[m][0]或sh_flags按位与masks[m][1]或sh_entsize不等于0UL的反或非strstarts - does @str start with @prefix?*@str: string to examine*@prefix: prefix to look for.则继续下一循环 |
2481 | sh_entsize等于Update size with this section: return offset. 按位或If this is set, the section belongs in the init part of the module |
2487 | Total size. 等于debug_align( Total size. ) |
2489 | 退出 |
2491 | Total size. 等于debug_align( Total size. ) |
2493 | 退出 |
2502 | Total size. 等于debug_align( Total size. ) |
2503 | 退出 |
名称 | 描述 |
---|---|
layout_and_allocate |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |