Initilisation of application in Linux -
I'm looking for a more or less detailed description of how an application is loaded into memory and then in Linux Is executed. In fact, I would like to know which information is read from which flf file, which is executed on system call, such as exec () unless this information is stored in the process descriptor.
Does anyone know good information. Dr. Google was not so helpful
thanks
The ladder will assist you with the system call , And here's what you get to run on yourself:
[root @ sting httpd] # strace strace execve ("/ usr / bin / strace", ["strace"], [/ * 27 vars * /]) = 0 Free: (0) = 0x9aa3000 mmap2 (zero, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0) = 0xb7873000 access ( "/ etc / ld.so.preload ", R_OK) = -1 ENOENT (No such file or directory) (" / etc / ld.so.cache ", O_RDONLY) = 3 fstat64 (3, {st_mode = S_IFREG | 0644, st_size = 90632, ... }) = 0 mmap2 (zero, 90,632, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb785c000 have (3) = 0 open ( "/ lib / libc.so.6", O_RDONLY) = 3 read (3, "\ 177ELF \ 1 \ 1 \ 1 \ 3 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 3 \ 0 \ 3 \ 0 \ 1 \ 0 \ 0 \ 20 \ - \\\ 0004 \ 0 \ 0 \ 0 "..., 512) = 512 fstat64 (3, {st_mode = S_IFREG | 0755, st_size = 2,403,884, ...}) = 0 mmap2 (0x5ac000, 1,526,120, PROT_READ | PROT_EXEC, MAP_PRIVATE | MAP_DENYWRITE, 3, 0) = 0x5ac000mm2 (0x71b000, 12288, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_DENYWRITE, 3, 0x16e) = 0x71b000mm2 (0x71e000, 10600, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1 , 0) = 0x71e000 have (3) = 0 mmap2 (zero, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0) = 0xb785b000 set_thread_area ({entry_number: -1 -> 6, base_addr: 0xb785b6c0, limit: 1048575 , seg_32bit: 1, material: 0, read_exec_only: 0, limit_in_pages: 1, seg_not_present: 0, useable: 1}) = 0 mprotect (0x71b000, 8192, PROT_READ) = 0 mprotect (0x5a8000, 4096, PROT_READ) = 0 munmap ( 0xb785c000, 90,632) = 0 Free: (0) = 0x9aa3000 brk (0x9ac4000) = 0x9ac4000 write (2 "use: strace [-dffhiqrtttTvVxx]" ..., 1655usage: strace [-dffhiqrtttTvVxx] [-a column] [-e Expr] ... [-o file]
Comments
Post a Comment