Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kexec_build_elf_info - read ELF executable and check that we can use it

Proto:int kexec_build_elf_info(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
333  ret = lf_read_from_buffer - read ELF file and sets up ELF header and ELF info*@buf: Buffer to read ELF file from
334  If ret Then Return ret
338  If e_type != ET_EXEC && e_type != ET_DYN Then
339  pr_err("Not an ELF executable.\n")
340  Go to error
341  Else if Not proghdrs Then
342  pr_err("No ELF program header.\n")
343  Go to error
346  When i < e_phnum cycle
352  If p_type == PT_INTERP Then
353  pr_err("Requires an ELF interpreter.\n")
354  Go to error
358  Return 0
359  error :
360  kexec_free_elf_info - free memory allocated by elf_read_from_buffer
361  Return -ENOEXEC
Caller
NameDescribe
kexec_elf_probe