Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_elf.c Create Date:2022-07-28 11:05:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lf_read_from_buffer - read ELF file and sets up ELF header and ELF info*@buf: Buffer to read ELF file from

Proto:static int elf_read_from_buffer(const char *buf, size_t len, struct elf64_hdr *ehdr, struct kexec_elf_info *elf_info)

Type:int

Parameter:

TypeParameterName
const char *buf
size_tlen
struct elf64_hdr *ehdr
struct kexec_elf_info *elf_info
302  ret = elf_read_ehdr(buf, len, ehdr)
303  If ret Then Return ret
306  buffer = buf
307  ehdr = ehdr
308  If Program header table file offset > 0 && e_phnum > 0 Then
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  If ret Then Return ret
313  Return 0
Caller
NameDescribe
kexec_build_elf_infokexec_build_elf_info - read ELF executable and check that we can use it