Subject: Re: Close to a port of licq 0.70.1 but... / dlsym()
To: John A. Maier <>
From: Julian Assange <>
List: tech-pkg
Date: 10/14/1999 05:11:13
"John A. Maier" <> writes:

> I've been working very close with the licq dev guys to get it to work under
> NetBSD.
> I got it compiling great (even fixed stuff for the FreeBSD guys!) but I've hit
> the top of my C skills.  Licq does some plugin stuff that both Net and Free
> BSDs puke on.
> It seems that out dynamic linking is different from that of Linux and some
> others.  licq has a gui 'plugin' component and a daemon.  The daemon
> doesn a dynamic load of this plugin.

NetBSD (and FreeBSD) a.out systems have "_" prepended to all their
symbols. Find the call to dlsym() and have it check for "_sym" if
"sym" fails (or more correctly see if you are compiling a.out first, and
#ifdef the code accordingly).

I (evilly) ended up just hacking my rtld.c:dlsym() to do this for me,
as I became so sick of the incompatabilities it produced.

Stefan Kahrs in [Kah96] discusses the
   notion of completeness--programs which never go wrong can be
   type-checked--which complements Milner's notion of
   soundness--type-checked programs never go wrong [Mil78].