This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Efficient linking
- From: Starling <wassdamo at pacbell dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: 11 Sep 2003 12:53:54 +0000
- Subject: Efficient linking
On the subject of incremental linking I did find something saying you
can go
ld -r -o piece1.o A.o B.o C.o ...
ld -r -o piece2.o D.o E.o F.o ...
ld -o all main.o piece1.o piece2.o
And that way you don't have to relink D, E, and F when A, B or C
changes. However, wouldn't that generate a large object file
(pieceN.o)? How is linking piece1.o and piece2.o more efficient than
linking all of the lesser object files at once? Is it more efficient,
or does the linker have to piece together the files just as if they
were separate?
Starling