How to debug linker errors?

walt wa1ter at myrealbox.com
Wed Aug 4 15:33:46 PDT 2004


For some reason I've seen two similar errors lately and I
don't know enough about linking to figure them out:
The problems I'm talking about are 'missing symbol' errors
occuring at link time, not at compile time.
I can easily see which header files define the 'missing'
symbols, and those headers were properly included in the
source files -- which is why there were no compile-time
errors, obviously.
So what makes the linker choke when trying to link the
object files?  Just where does the linker go to look
for 'missing' symbols?
In one of my examples the intended output is a shared
library (.so) (I'm still dinking away at porting xorg
to DFly), and the other example is the FBSD-current
kernel from today's cvsup.
I get the impression from reading the ld manpage that
libraries may be treated differently from executable
files when trying to find symbols -- is this correct?
Any suggestins for further reading on this topic for
someone who will never be a kernel hacker or compiler
writer?  ;o)
Thanks for any clues!





More information about the Bugs mailing list