This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with tguile's unexec


>>>>> "Greg" == Greg Badros <gjb@cs.washington.edu> writes:

    Greg> When I do: tguile --dump guile-all test-all.scm # (see below
    Greg> for test-all.scm)

    Greg> and then run ./guile-all, I get a prompt that looks like:

    guile> <s
    Greg>        ^ actually the <= single glyph character

    Greg> and before every printed response I get

    Greg> <f ^ same <= single glyph character

    Greg> For example, below, I entered "4" into the prompt:

    guile> <s 4
    Greg> <f4

This is caused by using module (ice-9 emacs). 

    Greg> Also, I'm confused about why I have to run
    Greg> `load-all-modules' again after starting ./guile-all before
    Greg> the procedures are visible.  Can anyone explain this to me?

I did no encounter this behaviour (even with (ice-9 emacs) loaded).
Could you be more specific ? I made the test on Solaris.

    Greg> Incidentally, is there a good way to write a module that
    Greg> exports symbols from a bunch of modules that it imports?
    Greg> E.g., a single module guile-all.scm that does the
    Greg> use-modules, and then another module can just use that one
    Greg> module and get at all the symbols?

Here is an example taken from guile-stklos-1.3.3 
(file stklos-3.0b2/stklos-sup):

(define-module (stklos-3.0b2 stklos-sup))
(use-modules (clos-1.7 clos))
(use-modules (tk4.1 win))

(let ((stk (resolve-interface '(stklos-3.0b2 stklos-sup))))
  (set-module-uses! 
   stk
   (append (module-uses stk)  
           (list (resolve-interface '(clos-1.7 clos))
                 (resolve-interface '(tk4.1 win))))))

It says that the exported symbols from (clos-1.7 clos) and (tk4.1 win)
are added to the exported symbols from (stklos-3.0b2 stklos-sup).

    Greg> Finally, how robust is unexec?  What's the probability that
    Greg> I'd be able to use the code from tguile-core.c embedded in
    Greg> Scwm and get Scwm to be able to dump itself after loading a
    Greg> bunch of its modules?

Unexec is borrowed from emacs. So it is possible to make it work on
your toaster, but only as long as you stay within the paradigm of
emacs. This means that you may have problems with dyn-loading code
in a dumped executable. 

On ELF machines (Linux, Solaris, Irix) it should be ok, but on HP-PA
you are hosed. I have some documentation about HP-PA dyn-loading
process, but no time to work on the subject.

Regards.

-- 

B. Urban

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]