dlsym requires leading underscore

Tim Pierce (twp@skepsis.com)
Fri, 21 Nov 1997 05:06:27 -0500 (EST)

On some systems, the symbol that is passed to dlsym requires a
leading underscore, or it can't be resolved. Obviously this isn't
true for all systems, but on systems where it is true,
sysdep_dynl_func (or perhaps even scm_dynamic_func or something else
high-level) should prepend the symbol with an underscore.

Any ideas on how to resolve this cleanly? Aubrey's experience here
will probably be instructive, since the dynamic loading code is
inherited from SCM.

We could write an autoconf macro to figure out whether dlopen needs
underscores. We could have sysdep_dynl_func try to resolve the symbol
both with and without a leading underscore. Not sure which solution
would be more hideous.