This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
g77 Command -- duplications
- To: gcc at gcc dot gnu dot org
- Subject: g77 Command -- duplications
- From: "Robert Kuhn" <Robert_Kuhn at mgic dot com>
- Date: Thu, 4 Jan 2001 17:12:55 -0600
To: gcc@gcc.gnu.org
From: Bob Kuhn
Subject: g77 Command -- duplications
I would like to thank those who have answered my past two questions.
I have two questions. I think they are simple but was unable to
find the answer in the documentation.
* DUPLICATION QUESTION
* Suppose I have the following:
1. The statement:
g77 -o PRG x.o y.o z.a
2. Suppose x.o has the compiled version of the main program and
SUBROUTINE A.
3. Suppose y.o has SUBROUTINE's A, B & C
4. Suppose z.a has SUBROUTINE's B and D.
* Then I have the following questions:
1. Will PRG contain the version of SUBROUTINE A that is in x.o
or y.o?
2. Will PRG contain the version of SUBROUTINE B that is in y.o
or z.a?
* LINK EDIT SPEED QUESTION
Suppose I have a main program x.for and 20 subroutines. I can do
two things:
* NO ARCHIVE
I could place the 20 subroutines into "y.for" and then compile
that file in order to create "y.o". I could then use:
g77 -o PRG1 x.for y.o (1)
* ARCHIVE
I could create 20 object files and archive them into "y.a"
using the "ar" command. I could then use:
g77 -o PRG2 x.for y.a (2)
My guess is that PRG1 and PRG2 would be identical. I also guess
is that the g77 command (1) will work more quickly than (2). Am
I correct? Is there a big difference in speed between the two
commands? What are your suggestions?