[Top][All Lists]

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

Re: On elisp running native

From: Andrea Corallo
Subject: Re: On elisp running native
Date: Sat, 28 Dec 2019 11:57:36 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>                           perhaps you should ask on the GCC
> list whether there are any fundamental problems with providing
> libgccjit on Windows.)


> Maybe you should explain in more detail how will the compiled code be
> loaded into Emacs.  Is each .el file compiled into a separate shared
> library?  If so, when the shared library is loaded, what entry point
> is called, and how does Emacs know which entry point to call when?

Every .el file is compiled into a .eln.  This is technically a shared

Into the .eln Emacs is expecting to find a bunch of symbols.  Two of
these are used for relocating objects and Emacs primitive functions.  So
Emacs essentially writes some pointers into them.

Then there's 'top_level_run'.  This is a real function that is responsible for
modifying the environment as the execution of the various top level forms
on the original .el file would do.

Emacs jumps into 'top_level_run' and this will call back into Emacs for
evaluating forms and/or defining native functions (effectively new
subrs).  This function is obviously not called when resuming from an
image dump.

> Also, compiling needs gas and ld, right?  IOW, people who'd like to
> use this feature for Lisp that is not part of Emacs will have to have
> GCC and GNU Binutils installed

Correct, IOW these are libgccjit dependencies.


reply via email to

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