Subject: Re: Where are Reg* implemented?
From: [email-masked] (Jason Zions)

1 Aug 1997 18:28:25 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Original-To: Ku Wei <[email-masked]>
Original-CC: [email-masked], Justin Hopkins <[email-masked]>
Original-Sender: [email-masked]

> Good point Jason about the ld man page. However, we are discuessing gcc
> or g++, not ld.

A difference that makes no difference; see below.

> It is clear that we need to put the main() entry ( in one of the .c or
> .cxx files) as the first of the source file list ( including .o and .c).
> However, the libraries are not 'source files' to g++. Instead, they are
> assigned as 'options' by '-l'. Therefore, it is really the compiler's
> responsibility to add these options to correct position in parameter list
> passed to 'ld' later.

And how on earth is gcc supposed to guess at this? There are times when
what *must* be passed to the loader is this:

    file1.o file2.o -lmylib file3.o file4.0 -lotherlib

If gcc can't preserve this ordering, it's fundamentally broken.

Jason

P.S. I'd address you informally, as you did me, but I admit to being
stumped as to whether I should call you Ku, Wei, or both (and in which
order - I've seen your address come with your name in both orders...
:-).

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".