Beam file format questions.
Tue Aug 27 14:55:15 CEST 2002
I now doubt would find it much easier. However, the
application I am using it for (code assist in an
eclipse plugin) is, becuase of Eclipse, all java. In
any case, I am done now. I figured out my problem. It
seams that that the beam file format uses a four byte
boundry (I missed that the first time around) and
thats where the nulls were coming in. Once I figured
that out it only took me a little time to finish up
the parser. The format itself is pretty easy to parse
once you make that realization.
--- Bjorn Gustavsson <> wrote:
> 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
> > 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
> > me at all. I am exporting two functions in my test
> > code, so accoring to the spec there should be a
> > of 24 bytes (12 bytes per exported function '3*4')
> > information after the chunk header, in mine there
> > 52 bytes. I hope one of you with a little more
> > and experience can explain where I am screwing up.
> > Following is some code I am using to generate the
> > file I am testing with, it doesn't do anything at
> > 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
> BOX 1505
> +46 8 727 56 87 125 25 Älvsjö
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
More information about the erlang-questions