`bash: ./a.out: No such file or directory` on running executable produced by `ld`
ld -lc a.o There are several things wrong with this command line: In general, user-level code should never use ld directly, and always use appropriate compiler front end (gcc here) to perform the link. As you have discovered, the link command line that gcc constructs is quite complicated, and the command line that you’ve accepted … Read more