Re: Dynamic Loading for multiple files?

From: Erick Gallesio <>
Date: Wed, 28 Sep 1994 14:33:43 +0000

> Is there a way to get multiple files to be dynamically loadable?
> I want to use the functionality in Extensions/hash.c to write another
> dynamically-loaded C file. Since hash.c is also statically linked in,
> I can do this, but later, I will want to have a *lot* of C files which
> all get dynamically linked into stk.
> Right now, I get this:
> bolverk:stk
> Welcome to the STk interpreter version 2.1
> Copyright (C) 1993, 1994 Erick Gallesio - I3S - CNRS / UNSA <>
> STk> (load "")
> #[undefined]
> STk> (load "")
> call to undefined procedure _make_hash_table from 0xef6fb114
> What am I doing wrong?

I don't know, but it seems that is unable to resolve this kind of call.
I don't know how to resolve this problem (without using static linking of
course). Is thers someone on the mailing list who knows how to use functions
which are dynamically loaded in a dynamic file?

DEC Alpha dlopen(2) states something like:

  void *dlopen(filename, mode)
  char *filename;
  int mode;


  If mode is RTLD_LAZY, then the runtime loader does symbol resolution only
  as needed. Typically, this means that the first call to a function in the
  newly loaded library will cause the resolution of the address of that func-
  tion to occur. If mode is RTLD_NOW, then the runtime loader must do all
  symbol binding during the dlopen call. The dlopen function returns a han-
  dle that is used by dlsym or dlclose call. If there is an error, a NULL
  pointer is returned.

Is RTLD_LAZY, the solution of this problem? (on sunos4, it seems however that
we have no choice since its is stated in the manual that mode must always be

                -- Erick
Received on Wed Sep 28 1994 - 14:33:44 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST