Consider this AMD64 assembly program:
.globl _start_start: xorl %edi, %edi movl $60, %eax syscall
If I compile that with gcc -nostdlib
and run ldd a.out
, I get this:
statically linked
If I instead compile that with gcc -static -nostdlib
and run ldd a.out
, I get this:
not a dynamic executable
What's the difference between statically linked
and not a dynamic executable
? And if my binary was already statically linked, why does adding -static
affect anything?