[Ecls-list] ECL fasl format
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sat Jul 17 21:41:49 UTC 2010
On Thu, Jul 15, 2010 at 3:08 AM, Gabriel Dos Reis <
gdr at integrable-solutions.net> wrote:
> Do you have a documentation for ECL's FASL format (and data structures)?
>
Not really: read.d and more precisely read_VV document the process of
initializing a FASL file, while load.d shows how it is loaded.
FASL files are just shared libraries. We do not use "formats" as such, but
just link together object files.
Each object file contains a single initialization routine, which is just a C
function with the statements in the lisp file, compiled.
This routine is called twice by read_VV. The first time it just returns a
structure (ecl_codeblock) with some fields filled in, such as the text
representation of all constants, the text representation of those constants
that are only used during initialization (and can be eliminated afterwards),
and some debug information.
The second time, the init function executes the compiled statements I
mentioned before. Now all constants and packages have been set up and thus
the lisp code works just fine. Functions will be installed by the statements
that implement DEFUN, and macros, classes, and other things will be defined.
But again, this is _how_ it works. There is no format as such. ECL just uses
whatever the operating system provides in terms of binary file formats,
system calls to load them, etc.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100717/5e9fd616/attachment.html>
More information about the ecl-devel
mailing list