guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On the deprecated auto-loading of compiled-code modules


From: Marius Vollmer
Subject: Re: On the deprecated auto-loading of compiled-code modules
Date: 02 May 2001 14:10:27 +0200
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Matthias Koeppe <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
> 
> > In effect, I want Guile to hand over almost all dynamic linking
> > issures to libtool, including the handling of libraries that are not
> > really dynamically linked.
> 
> Of course this is possible.  But I think that a real static linking
> method, avoiding libtool's "export-dynamic" feature, should be
> supported.

Hmm, why do you want that?  Is libtool too much hassle?  The way I
understand what you are doing now, your libraries are currently
static-only, i.e., you can _only_ link them statically, right?  When
using libtool, you would have a setup that allows them to be used
dynamically as well.  Even you yourself don't want that, others might.

The problem I can see with using libtool is that it might be
inefficient.  It will make a table of _all_ symbols for lt_dlsym while
we want to find only a few.

> >     init_module_initializer ()
> >     {
> >       scm_make_gsubr ("init-my-module", 0, 0, 0,
> >                       (SCM (*)())init_module_bindings);
> >     }
> 
> But who will call init_module_initializer?

Your `inner main' that is called by scm_boot_guile.  Like

    static void
    inner_main (void *closure, int argc, char **argv)
    {
      /* module initializations would go here */
      init_module_initializer ();
      scm_shell (argc, argv);
    }

    int
    main (int argc, char **argv)
    {
      /* this is for supporting `dynamic' linking on
         static-only platforms. */
    #ifdef DYNAMIC_LINKING
      LTDL_SET_PRELOADED_SYMBOLS ();
    #endif
      scm_boot_guile (argc, argv, inner_main, 0);
      return 0; /* never reached */
    }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]