19 messages in net.sourceforge.lists.courier-users[courier-users] Re: Courier on MacOS ...
FromSent OnAttachments
Daniel E. WhiteApr 29, 2002 5:30 pm 
Aly DharshiApr 29, 2002 6:38 pm 
Daniel E. WhiteApr 29, 2002 6:49 pm 
Aly DharshiApr 29, 2002 7:04 pm 
Daniel E. WhiteApr 29, 2002 7:20 pm 
Aly DharshiApr 29, 2002 7:23 pm 
Daniel E. WhiteApr 30, 2002 3:31 am 
Sam VarshavchikApr 30, 2002 6:22 am 
Gordon MessmerApr 30, 2002 7:42 am 
Daniel E. WhiteApr 30, 2002 4:12 pm 
Daniel E. WhiteMay 1, 2002 5:49 pm 
Nathan J. MehlMay 8, 2002 3:19 pm 
Daniel E. WhiteMay 8, 2002 6:15 pm 
Sam VarshavchikMay 8, 2002 6:45 pm 
Daniel E. WhiteMay 8, 2002 7:13 pm 
Sam VarshavchikMay 8, 2002 7:47 pm 
Daniel E. WhiteMay 8, 2002 7:49 pm 
Bill SchindlerMay 10, 2002 4:58 pm 
Sam VarshavchikMay 10, 2002 5:28 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: Courier on MacOS X and others -- Dangling GlobalsActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:May 8, 2002 7:47:39 pm
List:net.sourceforge.lists.courier-users

Daniel E. White writes:

And finally: cc -traditional-cpp -Wall -I./.. -I.. -o testlookup testlookup.o librfc1035.a
../soxwrap/libsoxwrap.a `cat ../soxwrap/soxlibs.dep` /usr/bin/ld: Undefined symbols: _rfc1035_default_resolver

So why am I getting an undefined symbol ? The symbol should be in rfc1035_res.o which should be in librfc1035.a

It is.

Or am I missing something ?

Apparently a decades-old bug in BSD-derived linkers has resurfaced. The old a.out linkers were only looking at unresolved function symbols, when searching libraries. So, if a library module did not have any unresolved functions from main it will be skipped, even if it declared unresolved data symbols.

If you put void foo() {} in rfc1035_res.c, and add foo() to main(), the program will link. What a mess.