函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lf_read_phdrs - read the program headers from the buffer* This function assumes that the program header table was checked for sanity.* Use elf_is_ehdr_sane() if it wasn't.

函数原型:static int elf_read_phdrs(const char *buf, size_t len, struct kexec_elf_info *elf_info)

返回类型:int

参数:

类型参数名称
const char *buf
size_tlen
struct kexec_elf_info *elf_info
255  ehdr等于ehdr
261  phdr_size等于elf_phdr的长度乘e_phnum
263  proghdrs等于分配内存并置零
264  如果非proghdrs则返回:负ENOMEM
267 i小于e_phnum循环
270  ret等于elf_read_phdr(buf, len, elf_info, i)
271  如果ret
272  kfree(proghdrs)
273  proghdrs = NULL
274  返回:ret
278  返回:0
调用者
名称描述
elf_read_from_bufferlf_read_from_buffer - read ELF file and sets up ELF header and ELF info*@buf: Buffer to read ELF file from