.beam difference between builds and misc HiPE questions

Matthias Lang matthias@REDACTED
Wed Nov 16 23:57:20 CET 2005


François-Denis Gonthier writes:

 > - I just noticed that everytime I build, whatever options I choose,
 > the .beam files are actually changed.  The size is not changed in
 > anyway but there is a small difference on the binary level.
 > 
 > What has changed? and most importantly for me, are those files
 > interchangeable between builds?  I suppose the difference is
 > something like a date to differentiate builds but I think it's
 > easier for me to ask this list than dig the internals of .beam
 > files.

Among other things, there's a timestamp (compile-time) in the BEAM
file. You can see the timestamp by evaluating

  <whatever-your-module-is-called>:module_info().

The files are interchangeable, as long as you don't change Erlang
VM versions.

(Actually, you can use beams made by the an older compiler in a newer
VM for many useful combinations of VM and compiler, but you usually
can't do the reverse.)

Matthias



More information about the erlang-questions mailing list