Function report |
Source Code:fs\binfmt_aout.c |
Create Date:2022-07-28 20:27:18 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:These are the functions used to load a.out style executables and shared* libraries. There is no binary dependent code anywhere else.
Proto:static int load_aout_binary(struct linux_binprm *bprm)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct linux_binprm * | bprm |
119 | regs = current_pt_regs() |
131 | Return -ENOEXEC |
147 | rlim = rlimit(RLIMIT_DATA) |
148 | If rlim >= RLIM_INFINITY Then rlim = ~0 |
150 | If length of data, in bytes + length of uninitialized data area for file, in bytes > rlim Then Return -ENOMEM |
164 | setup_new_exec(bprm) |
166 | end_code = length of text, in bytes + (start_code = Address of text segment in memory after it is loaded. (ex)) |
168 | end_data = length of data, in bytes + (start_data = N_DATADDR(ex)) |
170 | brk = length of uninitialized data area for file, in bytes + (start_brk = Address of bss segment in memory after it is loaded. (ex)) |
173 | retval = Finalizes the stack vm_area_struct. The flags and permissions are updated,* the stack is optionally relocated, and some extra space is added. |
179 | If N_MAGIC(ex) == Code indicating object file or impure executable. Then |
189 | pos = 32 |
200 | Else |
201 | If ( length of text, in bytes & 0xfff || length of data, in bytes & 0xfff ) && N_MAGIC(ex) != Code indicating pure executable. && printk_ratelimit() Then |
207 | If (fd_offset & ~PAGE_MASK) != 0 && printk_ratelimit() Then |
215 | error = vm_brk(Address of text segment in memory after it is loaded. (ex), length of text, in bytes + length of data, in bytes ) |
219 | read_code(file, Address of text segment in memory after it is loaded. (ex), fd_offset, length of text, in bytes + length of data, in bytes ) |
221 | Go to beyond_if |
229 | If error != Address of text segment in memory after it is loaded. (ex) Then Return error |
239 | beyond_if : |
240 | set_binfmt( & aout_format) |
252 | start_thread(regs, start address , start_stack) |
253 | Return 0 |
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 |