How to run manually produce an elf executable using ld?
问题 I'm trying to get my head around how the linking process works when producing an executable. To do that I'm reading Ian Taylor's blog series about it, but a lot of it is beyond me at the moment - so I'd like to see how it works in practice. At the moment I produce some object files and link them via gcc with: gcc -m32 -o test.o -c test.c gcc -m32 -o main.o -c main.c gcc -m32 -o test main.o test.o How do I replicate the gcc -m32 -o test main.o test.o stage using ld ? I've tried a very naive: