General linking question

Peter Naulls peter at chocky.org
Wed Aug 28 01:54:33 PDT 2002


In message <4b6d00a4basbellon at sbellon.de>
          Stefan Bellon <sbellon at sbellon.de> wrote:

> Hi!
> 
> I've got a general question concerning linking under RISC OS.
> 
> Let's assume that I have three object files: A, B and C. B and C are
> libraries. B depends on C because it refers to one symbol from C. But
> this is only needed in one function of B. Now, in order to get a
> working executable of A, A has to be linked against B, but doesn't make
> use of the function in B that needs the symbol from C.
> 
> How to link A and B together without the need of C? Is this possible
> under RISC OS?

If my understanding of linker semantics is correct, then the way to
do this is to split the functions up in B into smaller objects.  i.e.
A uses functions in B that are in the same object file as functions
which rely upon C.

-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
------------------------------------------------------------------------
Free RISC OS Hosting - http://www.prowl.org/



More information about the gcc mailing list