localbox ~ $ cat mkdir.c void main() { mkdir("blah"); } localbox ~ $ gcc mkdir.c -o mkd -static -O3 mkdir.c: In function `main': mkdir.c:2: warning: return type of `main' is not `int' localbox ~ $ ls -la | grep mkd -rwxr-xr-x 1 unknown users 482499 Jul 10 15:28 mkd -rw-r--r-- 1 unknown users 35 Jul 10 15:25 mkdir.c localbox ~ $ ./mkd localbox ~ $ ls -la | grep bla dr----x--t 2 unknown users 40 Jul 10 15:20 blah localbox ~ $ gdb mkd GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) r Starting program: /home/unknown/mkd Program exited with code 0377. (gdb) disas main Dump of assembler code for function main: 0x08048220 : push %ebp 0x08048221 : mov %esp,%ebp 0x08048223 : sub $0x8,%esp 0x08048226 : and $0xfffffff0,%esp 0x08048229 : sub $0xc,%esp 0x0804822c : push $0x8097b68 0x08048231 : call 0x804dc30 0x08048236 : mov %ebp,%esp 0x08048238 : pop %ebp 0x08048239 : ret 0x0804823a : nop 0x0804823b : nop 0x0804823c : nop 0x0804823d : nop 0x0804823e : nop 0x0804823f : nop End of assembler dump. (gdb) x/s 0x8097b68 0x8097b68 <_IO_stdin_used+4>: "blah" (gdb) disas mkdir Dump of assembler code for function mkdir: 0x0804dc30 : mov %ebx,%edx 0x0804dc32 : mov 0x8(%esp),%ecx 0x0804dc36 : mov 0x4(%esp),%ebx 0x0804dc3a : mov $0x27,%eax 0x0804dc3f : int $0x80 0x0804dc41 : mov %edx,%ebx 0x0804dc43 : cmp $0xfffff001,%eax 0x0804dc48 : jae 0x80505f0 <__syscall_error> 0x0804dc4e : ret 0x0804dc4f : nop End of assembler dump. (gdb)