函数逻辑报告 |
Source Code:fs\binfmt_elf_fdpic.c |
Create Date:2022-07-29 11:03:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:load the appropriate binary image (executable or interpreter) into memory* - we assume no MMU is available* - if no other PIC bits are set in params->hdr->e_flags* - we assume that the LOADable segments in the binary are independently relocatable* - we
函数原型:static int elf_fdpic_map_file(struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm, const char *what)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct elf_fdpic_params * | params | |
struct file * | file | |
struct mm_struct * | mm | |
const char * | what |
745 | nloads等于0 |
748 | nloads自加 |
761 | number of segments 等于nloads |
768 | 当: & == PT_LOADs require constant* displacement |
769 | 当: & == PT_LOADs should be contiguous |
776 | 默认 |
780 | 退出 |
784 | 如果e_entry则 |
800 | phdr等于 copy of PT_PHDR table |
822 | 退出 |
826 | phdr等于 copy of PT_PHDR table |
828 | 如果p_type不等于PT_DYNAMIC则继续下一循环 |
846 | 如果p_memsz恒等于0或p_memsz取模sizeof(Elf32_Dyn)不等于0则转到:dynamic_error |
853 | 如果d_tag不等于0则转到:dynamic_error |
855 | 退出 |
858 | 退出 |
866 | nloads等于 number of segments |
872 | load_addr等于 align the pointer to the (next) page boundary (core address to which mapped + allocation size recorded in file ) |
873 | 如果load_addr恒等于core address to which mapped 按位与PAGE_MASK的值则 |
874 | allocation size recorded in file 加等于load_addr减core address to which mapped 加allocation size recorded in file |
879 | number of segments 自减 |
880 | 继续下一循环 |
884 | mseg自加 |
891 | kdebug("- elfhdr : %lx", mapped ELF header user address ) |
892 | kdebug("- entry : %lx", mapped entry user address ) |
893 | kdebug("- PHDR[] : %lx", mapped PT_PHDR user address ) |
894 | kdebug("- DYNAMIC[]: %lx", mapped PT_DYNAMIC user address ) |
896 | 以loop小于 number of segments 循环kdebug("- LOAD[%d] : %08x-%08x [va=%x ms=%x]", loop, core address to which mapped , core address to which mapped + allocation size recorded in file - 1, VMA recorded in file , allocation size recorded in file ) |
902 | 返回:0 |
904 | dynamic_error : |
907 | 返回:负ELIBBAD |
名称 | 描述 |
---|---|
load_elf_fdpic_binary | load an fdpic binary into various bits of memory |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |