函数逻辑报告 |
Source Code:kernel\kexec_file.c |
Create Date:2022-07-27 12:06:10 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:crash_prepare_elf64_headers
函数原型:int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map, void **addr, unsigned long *sz)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct crash_mem * | mem | |
| int | kernel_map | |
| void ** | addr | |
| unsigned long * | sz |
| 1245 | nr_cpus等于num_possible_cpus() |
| 1263 | nr_phdr自加 |
| 1264 | elf_sz等于sizeof(Elf64_Ehdr)加nr_phdr乘sizeof(Elf64_Phdr) |
| 1274 | ELF "magic number" [EI_CLASS]等于ELFCLASS64 |
| 1275 | ELF "magic number" [EI_DATA]等于ELFDATA2LSB |
| 1276 | ELF "magic number" [EI_VERSION]等于EV_CURRENT |
| 1277 | ELF "magic number" [EI_OSABI]等于ELF_OSABI |
| 1278 | memset( ELF "magic number" + EI_PAD, 0, EI_NIDENT - EI_PAD) |
| 1281 | e_version等于EV_CURRENT |
| 1283 | e_ehsize等于sizeof(Elf64_Ehdr) |
| 1284 | e_phentsize等于sizeof(Elf64_Phdr) |
| 1289 | notes_addr等于per_cpu_ptr_to_phys(per_cpu_ptr(Per cpu memory for storing cpu states in case of system crash. , cpu)) |
| 1292 | e_phnum自加 |
| 1293 | phdr自加 |
| 1300 | e_phnum自加 |
| 1301 | phdr自加 |
| 1304 | 如果kernel_map则 |
| 1306 | p_flags等于These constants define the permissions on sections in the programheader, p_flags. 按位或PF_W按位或PF_X |
| 1310 | e_phnum自加 |
| 1311 | phdr自加 |
| 1320 | p_flags等于These constants define the permissions on sections in the programheader, p_flags. 按位或PF_W按位或PF_X |
| 1321 | Segment file offset 等于mstart |
| 1323 | Segment physical address 等于mstart |
| 1324 | Segment virtual address 等于__va(mstart) |
| 1325 | Segment size in file 等于 Segment size in memory 等于mend减mstart加1 |
| 1326 | Segment alignment, file & memory 等于0 |
| 1327 | e_phnum自加 |
| 1328 | phdr自加 |
| 1329 | pr_debug("Crash PT_LOAD elf header. phdr=%p vaddr=0x%llx, paddr=0x%llx, sz=0x%llx e_phnum=%d p_offset=0x%llx\n", phdr, Segment virtual address , Segment physical address , Segment size in file , e_phnum, Segment file offset ) |
| 1336 | 返回:0 |
| 名称 | 描述 |
|---|---|
| prepare_elf_headers | Prepare elf headers. Return addr and size |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |