Beam file format questions.

Eric Merritt cyberlync@REDACTED
Tue Aug 27 14:55:15 CEST 2002


Bjorn,

 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.

Thanks,
Eric
--- Bjorn Gustavsson <bjorn@REDACTED> wrote:
> You might find it easier to use the beam_lib module
> in stdlib
> instead of writing your own code.
> 
> /Bjorn
> 
> Eric Merritt <cyberlync@REDACTED> 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
> bjorn@REDACTED      ÄT2/UAB/F/P
> 			    BOX 1505
> +46 8 727 56 87 	    125 25 Älvsjö


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com



More information about the erlang-questions mailing list