函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lf_read_from_buffer - read ELF file and sets up ELF header and ELF info*@buf: Buffer to read ELF file from

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

返回类型:int

参数:

类型参数名称
const char *buf
size_tlen
struct elf64_hdr *ehdr
struct kexec_elf_info *elf_info
302  ret等于elf_read_ehdr(buf, len, ehdr)
303  如果ret则返回:ret
306  buffer等于buf
307  ehdr等于ehdr
308  如果 Program header table file offset 大于0且e_phnum大于0则
309  ret等于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.
310  如果ret则返回:ret
313  返回:0
调用者
名称描述
kexec_build_elf_infokexec_build_elf_info - read ELF executable and check that we can use it