函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:klp_resolve_symbols

函数原型:static int klp_resolve_symbols(Elf32_Shdr *relasec, struct module *pmod)

返回类型:int

参数:

类型参数名称
Elf32_Shdr *relasec
struct module *pmod
199  strtab等于strtab
200  Elf_Relarelas
201  Elf_Symsym
214  BUILD_BUG_ON - break compile if a condition is true(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 128)
216  relas等于sh_addr
218 i小于sh_sizeElf_Rela的长度循环
219  sym等于symtabELF_R_SYM(r_info)
220  如果st_shndx不等于SHN_LIVEPATCH
221  打印错误信息("symbol %s is not marked as a livepatch symbol\n", strtab + st_name)
223  返回:负EINVAL
227  cnt等于sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments
230  如果cnt不等于3则
231  打印错误信息("symbol %s has an incorrectly formatted name\n", strtab + st_name)
233  返回:负EINVAL
237  vmlinux等于非字符串比较
238  ret等于klp_find_object_symbol(vmlinux ? NULL : objname, symname, sympos, & addr)
240  如果ret则返回:ret
243  st_value等于addr
246  返回:0
调用者
名称描述
klp_write_object_relocations