General linking question

Peter Naulls peter at
Wed Aug 28 08:19:27 PDT 2002

In message <4b6d23436bsbellon at>
          Stefan Bellon <sbellon at> wrote:

> Then I switched to libfile, but now I cannot link the five libraries
> together once more when doing the partially linked binary for IDEA
> support.

This is certainly what you want to do.  5 ALF libraries, then finally
linked to a binary.

I'll clarify some terms here.   "partially linked" usually refers to
the AOF object format, although technically speaking ALF could also be
termed as this.  The -aof option takes several object files and spits
out a larger one.  Libfile simply bundles object files together, which
essentially remain as seperate entities.

The -aof option really is to be avoided if you can, as amoung other
things your binary will probably end up larger (as a result of issues
already dicussed).  Exceptions may arise you have a problem that I
currently do of libfile creating broken libraries.

So I would expect to see something like in OpenSSL, where Libfile -i (or
ar equivalent) is repeatedly called to increase the library size in each
directory with objects there, then finally link later on with the main
program to create the final binary.

 Peter Naulls - peter at
 Homepage                     -
 RISC OS C Programming        -
 Unix Programs on RISC OS     -
Free RISC OS Hosting -

More information about the gcc mailing list