Quantcast
Viewing all articles
Browse latest Browse all 22228

What's the difference between "statically linked" and "not a dynamic executable"?

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?


Viewing all articles
Browse latest Browse all 22228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>