Function report |
Source Code:kernel\kexec_elf.c |
Create Date:2022-07-28 11:04:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:elf_read_ehdr
Proto:static int elf_read_ehdr(const char *buf, size_t len, struct elf64_hdr *ehdr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | buf | |
size_t | len | |
struct elf64_hdr * | ehdr |
129 | No 3D Now!( ELF "magic number" , buf, size of ELF "magic number" ) |
130 | If Not elf_is_elf_file(ehdr) Then |
138 | Else if ELF "magic number" [EI_DATA] != ELFDATA2LSB && ELF "magic number" [EI_DATA] != ELFDATA2MSB Then |
145 | If elf16_to_cpu(ehdr, e_ehsize) != size of buf_ehdr Then |
150 | e_type = elf16_to_cpu(ehdr, e_type) |
151 | e_machine = elf16_to_cpu(ehdr, e_machine) |
152 | e_version = elf32_to_cpu(ehdr, e_version) |
153 | e_flags = elf32_to_cpu(ehdr, e_flags) |
154 | e_phentsize = elf16_to_cpu(ehdr, e_phentsize) |
155 | e_phnum = elf16_to_cpu(ehdr, e_phnum) |
156 | e_shentsize = elf16_to_cpu(ehdr, e_shentsize) |
157 | e_shnum = elf16_to_cpu(ehdr, e_shnum) |
158 | e_shstrndx = elf16_to_cpu(ehdr, e_shstrndx) |
161 | Case ELF "magic number" [EI_CLASS] == ELFCLASS64 |
165 | Break |
167 | Case ELF "magic number" [EI_CLASS] == ELFCLASS32 |
171 | Break |
173 | Default |
178 | Return If lf_is_ehdr_sane - check that it is safe to use the ELF header*@buf_len: size of the buffer in which the ELF file is loaded. Then 0 Else -ENOEXEC |
Name | Describe |
---|---|
elf_read_from_buffer | lf_read_from_buffer - read ELF file and sets up ELF header and ELF info*@buf: Buffer to read ELF file from |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |