函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\module.c Create Date:2022-07-27 11:59:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Set up our basic convenience variables (pointers to section headers,* search for module section index etc), and do some basic section* verification.* Set info->mod to the temporary copy of the module in info->hdr. The final one

函数原型:static int setup_load_info(struct load_info *info, int flags)

返回类型:int

参数:

类型参数名称
struct load_info *info
intflags
3056  sechdrs等于hdre_shoff
3057  secstrings等于hdrsh_offset
3061  info等于Find a module section: 0 means not found.
3062  如果infoname等于get_modinfo(info, "name")
3066 i小于e_shnum循环
3067  如果sh_type恒等于SHT_SYMTAB
3068  sym等于i
3069  str等于sh_link
3070  strtab等于hdrsh_offset
3072  退出
3076  如果sym恒等于0则
3077  打印警告信息("%s: module has no symbols (stripped?)\n", name ? : "(missing .modinfo section or name field)")
3079  返回:负ENOEXEC
3082  mod等于Find a module section: 0 means not found.
3083  如果非mod
3084  打印警告信息("%s: No module found in object\n", name ? : "(missing .modinfo section or name field)")
3086  返回:负ENOEXEC
3089  pointer to module in temporary copy, freed at end of load_module() 等于hdrsh_offset
3095  如果非namename等于 Unique handle for this module
3098  如果flags按位与Flags for sys_finit_module: vers等于0
3100  否则vers等于Find a module section: 0 means not found.
3103  pcpu等于find_pcpusec(info)
3105  返回:0
调用者
名称描述
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.