How many times will the program call system function regardless of the program implementation?

An explanation would be really nice. I could not even understand the question.

2019 Feb 6, 11:49:55 AM

Here is what I get with bare "int main() {}". Why not "at least twice"??? $ strace ./a.out execve("./a.out", ["./a.out"], 0x7ffee0646550 /* 63 vars */) = 0 brk(NULL) = 0x5641a2dff000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=183659, ...}) = 0 mmap(NULL, 183659, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdaa593e000 close(3) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=2030544, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdaa593c000 mmap(NULL, 4131552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdaa5353000 mprotect(0x7fdaa553a000, 2097152, PROT_NONE) = 0 mmap(0x7fdaa573a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7fdaa573a000 mmap(0x7fdaa5740000, 15072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdaa5740000 close(3) = 0 arch_prctl(ARCH_SET_FS, 0x7fdaa593d4c0) = 0 mprotect(0x7fdaa573a000, 16384, PROT_READ) = 0 mprotect(0x5641a236f000, 4096, PROT_READ) = 0 mprotect(0x7fdaa596b000, 4096, PROT_READ) = 0 munmap(0x7fdaa593e000, 183659) = 0 exit_group(0) = ? +++ exited with 0 +++

2019 Jan 11, 5:04:17 PM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes