General linking question

Timothy Baldwin T.E.Baldwin99 at
Wed Aug 28 13:23:12 PDT 2002

Hash: SHA1

On Wednesday 28 Aug 2002 10:54 am, Stefan Bellon wrote:
> Peter Naulls wrote:
> > In message <4b6d00a4basbellon at>
> >           Stefan Bellon <sbellon at> wrote:
> [snip]
> > > 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,
> ... but on GNU/Linux, the gcc linker handles it (I have been told).

The linker isn't part of gcc. The build time linker, ld (part of GNU 
binutils), does not handle it. However for dynamic libraries the runtime 
linker,, does handle dependencices. Also GNU Libtool will handle 

> Yes, that's how I do it at present. But in order to keep the RISC OS
> source as close as possible to the mainstream source it would be easier
> if it worked otherwise.

The beavhiour of (static) libraries on RISC OS is fully compatiable with unix.

> RISC OS linkers are able to exclude unused areas from the executable.
> But the dependence checks seem to be done prior to excluding unused
> areas. Why isn't this swapped around? Then the unused areas can have
> further dependences, but they needn't be fulfilled as the area is
> unused and therefore excluded anyway.

If the order is reversed then areas which are needed by a library, may get 

- -- 
Timothy Baldwin
Member WYLUG, SWP, ANL, Leeds SA, Leeds Anti-war coalition
Stop the EU Copyright Directive!
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the gcc mailing list