3 ms·
So why did he use gcc to link the program at the end?
by quasarj 7y ago
So why did he use gcc to link the program at the end?
- saagarjha 7y agoGCC is a front-end: in this case, it should just call ld.
- smhenderson 7y agoBecause he wrote a compiler but not a linker?
- fluffything 7y agogcc is probably used to call the platforms linker
- daniel-levin 7y agoI imagine it is because gcc -o is a convenient way to call the linker such that it correctly links the binary and libc. Doing this manually with ld would require several (non-portable) command line arguments that would be distracting from the main point of the post.