lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It is not only the operating system that can change how bytecode works, but also the processor. Bytecode is not portable and should not be expected to be portable. If you're looking for source code obfuscation, you will not find it with shipping bytecode.

On Thu, May 24, 2018 at 8:21 AM Michal Lisičan <michal1.lisican1@gmail.com> wrote:
Is possible to set which order will use comiler? Is possible to to make bytecode on windows and run it on linux based system?

Thank you.

št 24. 5. 2018 o 15:06 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> napísal(a):
> I have a two bitecodes what was made with two different lua copilers can you
> explain me difference beetwen those two bitecodes? I see swaped few bytes in
> second line. Can you explain me why? What are that bytes? I use luac version
> 5.3.4.

The order of the byte are different because the platforms where you
ran luac are different.

For the format of the header, see
https://www.lua.org/source/5.3/ldump.c.html#DumpHeader

0000-0020:  08 78 56 00-00 00 00 00-00 00 28 77-40 01 00 00  .xV..... ..(w@...
0000-0020:  08 78 56 00-00 00 28 77-40 00 00 00-00 01 00 00  .xV...(w @.......

The 8 bytes " 00 00 00 00 00 28 77 40" are a double (370.5 in Lua
5.3), stored in Intel order.

The 8 bytes "00 28 77 40 00 00 00 00" are the same number stored in a
different order, I'm guessing an ARM here.

--
--
Ryan | Charles <vandor2012@gmail.com>
Software Developer / System Administrator
https://hashbang.sh
https://getmediapanel.com