Isso ocorre porque gcc
cria subprocessos e strace
não examina subprocessos, a menos que você especifique o -ff
flag.
Veja strace -ff
flag em ação neste exemplo:
deltik@workstation [~/Desktop]# echo > foobar.c
deltik@workstation [~/Desktop]# strace -ff gcc -c foobar.c 2>&1 | grep foobar.o
[pid 14220] execve("/usr/local/sbin/as", ["as", "--64", "-o", "foobar.o", "/tmp/ccJhzHTZ.s"], [/* 66 vars */]) = -1 ENOENT (No such file or directory)
[pid 14220] execve("/usr/local/bin/as", ["as", "--64", "-o", "foobar.o", "/tmp/ccJhzHTZ.s"], [/* 66 vars */]) = -1 ENOENT (No such file or directory)
[pid 14220] execve("/usr/sbin/as", ["as", "--64", "-o", "foobar.o", "/tmp/ccJhzHTZ.s"], [/* 66 vars */]) = -1 ENOENT (No such file or directory)
[pid 14220] execve("/usr/bin/as", ["as", "--64", "-o", "foobar.o", "/tmp/ccJhzHTZ.s"], [/* 66 vars */] <unfinished ...>
[pid 14220] stat("foobar.o", 0x7ffed65b3850) = -1 ENOENT (No such file or directory)
[pid 14220] open("foobar.o", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3