Subject: Re: Compiler weirdness.
To: None <greywolf@starwolf.com>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 04/03/2003 23:28:25
In article <Pine.NEB.4.51.0304031142410.4151@lothlorien.starwolf.com> you write:
>Note that the symbol is found via nm in one of the libs, and said lib is
>specified prior to the lib which references said symbol.

I think this is your problem.  ld collects the list of unresolved symbols as
it goes along, and when it gets to a new object file, it tries to resolve
all the unresolved symbols on its list.  If that object file's in a static
library, it only bothers including it in the link if it resolves a
previously-unresolved reference.  Presumably the object that contains the
symbol you want didn't get included, because it wasn't unresolved when that
library was searched.  Hence, you need to shuffle the libraries around on
your link line.

[ Oh, and the list you wanted was tech-toolchain ]

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>