Beam file format questions.
Tue Aug 27 08:49:51 CEST 2002
You might find it easier to use the beam_lib module in stdlib
instead of writing your own code.
Eric Merritt <> writes:
> First, the 'Atom' and 'Code' chunks seem to have an
> extra two null bytes padded onto the end of thier
> chunks (beyond the length specified in the chunk
> header). The other chunks seem to obey the format
> specified in the above document. It could very well be
> that I am just a bit off in the head and missing
> something. Hopefully, one of you will confirm.
Chunks are aligned to a four-byte boundary. I think
that is mentioned in the specification.
> Second, the 'ExpT' chunks doesn't seem too useful to
> me at all. I am exporting two functions in my test
> code, so accoring to the spec there should be a total
> of 24 bytes (12 bytes per exported function '3*4') of
> information after the chunk header, in mine there are
> 52 bytes. I hope one of you with a little more insight
> and experience can explain where I am screwing up.
> Following is some code I am using to generate the beam
> file I am testing with, it doesn't do anything at all
> really except produce a beam file.
The compiler always generates two extra functions in
each module: module_info/0,1.
Björn Gustavsson Ericsson Utvecklings AB
+46 8 727 56 87 125 25 Älvsjö
More information about the erlang-questions