General linking question

Stefan Bellon sbellon at
Wed Aug 28 06:10:02 PDT 2002

Tony van der Hoff wrote:
> On 28 Aug 2002, in message <4b6d0e0545sbellon at>,
> Stefan Bellon <sbellon at> wrote:


> > No, that's not the case! In B there's an unresolved symbol, but the
> > function which depends on it isn't needed by A. Nevertheless, during
> > linking it is shown as missing and link aborts. 
> > 
> Are you observing this behaviour with all linkers? In that case I
> must be mistaken. It is not, however behaviour that I've previously
> seen, nor what I have seen documented. Do you have a minimal test
> case that you can send me?

Ah, got it! I thought one could use "link -aof" and "drlink -aof" for
creating those libraries. If I use either of those, then I get the
problems I explained. If I use libfile or makealf, then it works like
you explained.

I wasn't aware that link and drlink with the -aof switch produce
something different.

Ok, but now I have a problem: How do I create a new library from a few
other libraries? With (dr)link -aof you could link together files that
have already been linked with (dr)link -aof. You cannot do the same with
libfile or makealf. You get:

AOF Librarian:  (Error)  Bad library member oldlib.

from libfile and:

! Warning (makealf): object file oldlib has no header chunk.

from makealf.

I have the problem that I hit the command line length (2048 characters
as it seems) when linking. With (dr)link -aof I could link together
parts and then link those parts together. With libfile or makealf this
doesn't work.

What am I missing?

 Stefan Bellon * <mailto:sbellon at> * <>
 PGP 2 and OpenPGP keys available from my home page

 I am always amazed to hear of air crash victims being so badly mutilated that
 they have to be identified by their dental records. What I can't understand is,
 if they don't know who they are, how do they know who their dentist is?

More information about the gcc mailing list