函数逻辑报告 |
Source Code:fs\binfmt_elf_fdpic.c |
Create Date:2022-07-29 11:03:58 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:map a binary by direct mmap() of the individual PT_LOAD segments
函数原型:static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct elf_fdpic_params * | params | |
| struct file * | file | |
| struct mm_struct * | mm |
| 1014 | delta_vaddr等于0 |
| 1015 | dvset等于0 |
| 1020 | phdr等于 copy of PT_PHDR table |
| 1023 | prot等于0 |
| 1028 | kdebug("[LOAD] va=%lx of=%lx fs=%lx ms=%lx", (unsignedlong)p_vaddr, (unsignedlong)p_offset, (unsignedlong)p_filesz, (unsignedlong)p_memsz) |
| 1035 | 如果p_flags按位与These constants define the permissions on sections in the programheader, p_flags. 则prot或等于page can be read |
| 1036 | 如果p_flags按位与PF_W则prot或等于page can be written |
| 1037 | 如果p_flags按位与PF_X则prot或等于page can be executed |
| 1039 | flags等于Changes are private 按位或ETXTBSY |
| 1043 | maddr等于0 |
| 1046 | 当: & == PT_LOADs can be put anywhere |
| 1048 | 退出 |
| 1050 | 当: & == PT_LOAD.vaddr must be honoured |
| 1056 | 当: & == PT_LOADs require constant* displacement |
| 1061 | 如果非dvset则 |
| 1065 | 否则 |
| 1066 | maddr等于load_addr加p_vaddr减delta_vaddr |
| 1067 | flags或等于Interpret addr exactly |
| 1069 | 退出 |
| 1071 | 当: & == PT_LOADs should be contiguous |
| 1073 | 退出 |
| 1075 | 默认 |
| 1076 | BUG() |
| 1086 | kdebug("mmap[%d] <file> sz=%lx pr=%x fl=%x of=%lx --> %08lx", loop, p_memsz + disp, prot, flags, p_offset - disp, maddr) |
| 1090 | 如果IS_ERR_VALUE(maddr)则返回:maddr |
| 1093 | 如果flags按位与PT_LOAD arrangement flags 的值恒等于PT_LOADs should be contiguous 则load_addr加等于 align the pointer to the (next) page boundary (p_memsz + disp) |
| 1098 | VMA recorded in file 等于p_vaddr |
| 1107 | 如果prot按位与page can be written 且disp大于0则 |
| 1127 | flags或等于Interpret addr exactly 按位或don't use a file |
| 1140 | 如果prot按位与page can be written 且excess1大于0则 |
| 1157 | 如果mm则 |
| 1169 | seg自加 |
| 1172 | 返回:0 |
| 名称 | 描述 |
|---|---|
| elf_fdpic_map_file | 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 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |