https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102992
--- Comment #18 from Jürgen Reuter <juergen.reuter at desy dot de> --- (In reply to Thomas Koenig from comment #13) > Here is a complete strace of a "Hello, world" program on Linux, compiled > with -static-libgfortran (to remove some of the shared library loading :-) > and executed with > > $ strace ./a.out > hello.dat > > execve("./a.out", ["./a.out"], 0x7fff23679850 /* 52 vars */) = 0 > brk(NULL) = 0x55795af28000 > > Is it possible to run an equivalent command on MacOS to see > what is going on there? Seems that dtruss is doing the same under macOS, here I get this output for the Hello, world! program: SYSCALL(args) = return Hello, world!\n access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2 bsdthread_register(0x7FF805E18020, 0x7FF805E1800C, 0x2000) = 1073742303 0 shm_open(0x7FF805CE6F5D, 0x0, 0x5CE57BA) = 3 0 fstat64(0x3, 0x7FF7BDDDE820, 0x0) = 0 0 mmap(0x0, 0x2000, 0x1, 0x40001, 0x3, 0x0) = 0x102231000 0 close(0x3) = 0 0 ioctl(0x2, 0x4004667A, 0x7FF7BDDDE8D4) = 0 0 mprotect(0x102238000, 0x1000, 0x0) = 0 0 mprotect(0x10223F000, 0x1000, 0x0) = 0 0 mprotect(0x102240000, 0x1000, 0x0) = 0 0 mprotect(0x102247000, 0x1000, 0x0) = 0 0 mprotect(0x102233000, 0x90, 0x1) = 0 0 mprotect(0x102233000, 0x90, 0x3) = 0 0 mprotect(0x102233000, 0x90, 0x1) = 0 0 mprotect(0x102248000, 0x1000, 0x1) = 0 0 mprotect(0x102249000, 0x90, 0x1) = 0 0 mprotect(0x102249000, 0x90, 0x3) = 0 0 mprotect(0x102249000, 0x90, 0x1) = 0 0 mprotect(0x102233000, 0x90, 0x3) = 0 0 mprotect(0x102233000, 0x90, 0x1) = 0 0 mprotect(0x102248000, 0x1000, 0x3) = 0 0 mprotect(0x102248000, 0x1000, 0x1) = 0 0 issetugid(0x0, 0x0, 0x0) = 0 0 getentropy(0x7FF7BDDDE6D0, 0x20, 0x0) = 0 0 getentropy(0x7FF7BDDDE730, 0x40, 0x0) = 0 0 getpid(0x0, 0x0, 0x0) = 61321 0 stat64("/AppleInternal\0", 0x7FF7BDDDEDF0, 0x0) = -1 Err#2 csops_audittoken(0xEF89, 0x7, 0x7FF7BDDDE920) = -1 Err#22 proc_info(0x2, 0xEF89, 0xD) = 64 0 csops_audittoken(0xEF89, 0x7, 0x7FF7BDDDEA10) = -1 Err#22 sysctlbyname(kern.osvariant_status, 0x15, 0x7FF7BDDDEE40, 0x7FF7BDDDEE38, 0x0) = 0 0 csops(0xEF89, 0x0, 0x7FF7BDDDEE74) = 0 0 fstat64(0x0, 0x7FF7BDDDEBF0, 0x0) = 0 0 fstat64(0x1, 0x7FF7BDDDEBF0, 0x0) = 0 0 fstat64(0x2, 0x7FF7BDDDEBF0, 0x0) = 0 0 mprotect(0x10212F000, 0x100000, 0x1) = 0 0 sigaction(0x3, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x4, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x6, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x8, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0xB, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0xA, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0xC, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x5, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x18, 0x7FF7BDDDFFA8, 0x7FF7BDDDFFD0) = 0 0 sigaction(0x19, 0x7FF7BDDDFFB8, 0x7FF7BDDDFFE0) = 0 0 write(0x1, " Hello, world!\\n\n\0", 0x11) = 17 0