unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Camm Maguire <camm@enhanced.com>
Cc: gcl-devel@gnu.org, emacs-devel@gnu.org
Subject: Re: Re: unexec development
Date: 15 Oct 2004 17:11:43 -0400	[thread overview]
Message-ID: <541xfzn0ts.fsf@intech19.enhanced.com> (raw)
In-Reply-To: <7345AB9E-1EB7-11D9-B2CE-000D93505B76@swipnet.se>

Greetings, and thanks for your reply!

"Jan D." <jan.h.d@swipnet.se> writes:

> > Greetings!  Just another ping on this issue.  Is anyone working on
> > unexec anymore?  Does anyone have interest in doing so?
> >
> 
> Can you describe what the benefits for Emacs would be?  Or why you
> want  this.
> 

Well, the benefits for emacs might not accrue in the immediate future.
To my very limited understanding, emacs only byte-compiles code loaded
into and executed from its heap.  GCL can compile, load, and execute
native code this way.  In principle at least, emacs might want to do
likewise at some point in the future for performance reasons.  I agree
it is far from pressing.  But the GCL compiler is written in lisp and
probably would work for emacs without too much work.

In such a setup, it makes sense that a user might want to compile and
load code into their heap which references external functions in
shared libraries which could be dlopened at runtime.  All is well
until the unexec, when the mapping from the heap to the dlopened
shared library is lost, as the start address of the latter is not
reliable..  Perhaps one might say to just relink by hand when the
saved image is restarted.  This is indeed a possibility.  But at least
in the case of gcl, this cycle of compile,load,save,restart occurs
many times in the course of building a particular application.  There
should be no reason we couldn't push the relinking work onto ld.so,
with the added advantage that the binary could be prelinked and thus
accelerated at the end.  Doing this in GCL would be to essentially
duplicate the functionality of ld.so.

As an aside, I notice that even without this, gcl images cannot be
prel at present, and I assume the same is for emacs, as the images are
formed by unexec.  This must be related to the lack of initialization
of some elf section I'd think.  Something else that could be addressed
at the same time.

Take care,


> 	Jan D.
> 
> > Camm Maguire <camm@enhanced.com> writes:
> >
> >> Greetings!  Currently, GCL and programs built on top of it
> >> (maxima,acl2,axiom), use emacs' unexec by default to save intermediary
> >> and final system images.  Compiled code is loaded and relocated
> >> dynamically at runtime, stored in an expanding .data section via sbrk,
> >> and finally dumped with unexec.
> >>
> >> I would like to extend this functionality if possible to include
> >> compiled code which references symbols in external shared libs opened
> >> again dynamically at runtime via dlopen.  Loading and relocating is
> >> straightforward, but somehow I'd need to have unexec write a
> >> new relocation record into the final image for each symbol for use by
> >> ld.so.
> >>
> >> Does this sound of interest to emacs too?  Does this trigger any ideas
> >> as to a possibly better approach?
> >>
> >> Take care,
> >> --
> >> Camm Maguire			     			camm@enhanced.com
> >> ======================================================================
> >> ====
> >> "The earth is but one country, and mankind its citizens."  --
> >> Baha'u'llah
> >>
> >>
> >> _______________________________________________
> >> Emacs-devel mailing list
> >> Emacs-devel@gnu.org
> >> http://lists.gnu.org/mailman/listinfo/emacs-devel
> >>
> >>
> >>
> >
> > -- 
> > Camm Maguire			     			camm@enhanced.com
> > =======================================================================
> > ===
> > "The earth is but one country, and mankind its citizens."  --
> > Baha'u'llah
> >
> >
> > _______________________________________________
> > Emacs-devel mailing list
> > Emacs-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-devel
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> Gcl-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

  reply	other threads:[~2004-10-15 21:11 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-03  7:05 info faces for strings and quotations Drew Adams
2004-10-05  7:15 ` Drew Adams
2004-10-05  7:30   ` Miles Bader
2004-10-06  8:34     ` Matt Hodges
2004-10-05  8:58   ` Drew Adams
2004-10-05 11:43     ` Stefan
2004-10-05 11:56   ` Stefan
2004-10-05 16:11     ` Drew Adams
2004-10-06  2:25       ` Luc Teirlinck
2004-10-06  4:19         ` Drew Adams
2004-10-06  4:28           ` Miles Bader
2004-10-06  7:40             ` Drew Adams
2004-10-06 21:32               ` Drew Adams
2004-10-06  4:53           ` Stefan Monnier
2004-10-06  7:07             ` Drew Adams
2004-10-06 17:07               ` Robert J. Chassell
2004-10-06 21:36                 ` Drew Adams
2004-10-07  5:53                 ` Juri Linkov
2004-10-07  6:53                   ` Drew Adams
2004-10-07 14:58                     ` Stefan Monnier
2004-10-07 15:13                       ` David Kastrup
2004-10-07 17:01                         ` Stefan Monnier
2004-10-08  5:13                           ` Drew Adams
2004-10-07 15:13                       ` Kim F. Storm
2004-10-07 16:35                         ` David Kastrup
2004-10-08  0:33                   ` Luc Teirlinck
2004-10-08 16:04                   ` Richard Stallman
2004-10-08 16:51                     ` Luc Teirlinck
2004-10-09 15:45                       ` Richard Stallman
2004-10-08 20:00                     ` Robert J. Chassell
2004-10-07  5:57               ` Juri Linkov
2004-10-07 15:22               ` w3 mode Camm Maguire
2004-10-07 17:03                 ` Stefan Monnier
2004-10-07 17:25                   ` Camm Maguire
2004-10-07 17:37                     ` Mark Plaksin
2004-10-07 17:45                     ` Kevin Rodgers
2004-10-08 16:05                 ` Richard Stallman
2004-10-08 17:44                   ` David Kastrup
2004-10-07 15:28               ` unexec development Camm Maguire
2004-10-15 14:10                 ` Camm Maguire
2004-10-15 14:35                   ` Jan D.
2004-10-15 21:11                     ` Camm Maguire [this message]
2004-10-16 13:52                   ` Richard Stallman
2004-10-06  8:44         ` info faces for strings and quotations Oliver Scholz
2004-10-07  5:55       ` Juri Linkov
2004-10-07  7:13         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=541xfzn0ts.fsf@intech19.enhanced.com \
    --to=camm@enhanced.com \
    --cc=emacs-devel@gnu.org \
    --cc=gcl-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).