C++ – Using LD to link intermediate files

cldlinker

If I have a.o, b.o, and c.o, how do I make ld link them into d.o, which is then linked into my main object file? All that I want to have happen is that all the symbols in the input files get combined into one big output file.

Best Answer

Found it. The -r option links files incrementally, so they can be used as input to ld.