[erlang-questions] Detect beam compilation target

Vlad Dumitrescu vladdu55@REDACTED
Sun Feb 28 14:51:41 CET 2016


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 <constantin@REDACTED> 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
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160228/8642ef2e/attachment.htm>


More information about the erlang-questions mailing list