函数逻辑报告 |
Source Code:kernel\kexec_elf.c |
Create Date:2022-07-27 12:06:27 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:elf_read_ehdr
函数原型:static int elf_read_ehdr(const char *buf, size_t len, struct elf64_hdr *ehdr)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| const char * | buf | |
| size_t | len | |
| struct elf64_hdr * | ehdr |
| 129 | 内存复制( ELF "magic number" , buf, ELF "magic number" 的长度) |
| 130 | 如果非elf_is_elf_file(ehdr)则 |
| 138 | 否则如果 ELF "magic number" [EI_DATA]不等于ELFDATA2LSB且 ELF "magic number" [EI_DATA]不等于ELFDATA2MSB则 |
| 145 | 如果elf16_to_cpu(ehdr, e_ehsize)不等于buf_ehdr的长度则 |
| 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 | 当: ELF "magic number" [EI_CLASS]恒等于ELFCLASS64 |
| 165 | 退出 |
| 167 | 当: ELF "magic number" [EI_CLASS]恒等于ELFCLASS32 |
| 171 | 退出 |
| 173 | 默认 |
| 178 | 返回:如果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.则0否则负ENOEXEC |
| 名称 | 描述 |
|---|---|
| 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 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |