[erlang-questions] Detect beam compilation target

Vlad Dumitrescu <>
Sun Feb 28 15:02:44 CET 2016


Ah, great! I was about to scan the OTP repository history and create the
map from that. Thank you!

regards,
Vlad


On Sun, Feb 28, 2016 at 3:00 PM, Constantin Rack <> wrote:

> There is a list of all opcodes with comments about the runtime version
> here:
> https://github.com/erlang/otp/blob/master/lib/compiler/src/genop.tab
>
> -Constantin
>
>
> Am 28.02.2016 um 14:51 schrieb Vlad Dumitrescu:
>
> > Thanks! I was a bit confused that all the files I had looked at had the
> same value, regardless. My error was that I didn't think that the value
> depends on the code actually in that module. Checking for example maps.beam
> gives a different value.
> >
> > So now I only have to find out if there is a table mapping the max
> opcode value to the beam runtime version.
> >
> > best regards,
> > Vlad
> >
> >
> > On Sun, Feb 28, 2016 at 1:32 PM, Constantin Rack <>
> wrote:
> > The BEAM format number and the number of the highest opcode are stored
> in the code chunk:
> >
> https://github.com/erlang/otp/blob/master/erts/emulator/beam/beam_load.c#L1714-L1757
> >
> > -Constantin
> >
> >
> > Am 28.02.2016 um 12:53 schrieb Vlad Dumitrescu:
> >
> >> Hi!
> >>
> >> Is there some information in the beam files that would identify the
> compatibility with the current runtime, or is it only when trying to
> execute incompatible code that it is detected?
> >>
> >> best regards,
> >> Vlad
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160228/86b7420b/attachment.html>


More information about the erlang-questions mailing list