luadump

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

luadump

David Burgess
David Given wrote:
> (Except in the debugging
> code, with you remove with the luac -s option.)

Mike Pall wrote:
> Which reminds me: I don't need it for obfuscation, but to save
> space. luac uses the internal function luaU_dump() since the
> option to strip debug symbols is missing from string.dump and
> lua_dump().
>
> To the Lua team: Can we get this functionality exposed to the
> API? Thank you!
>

A timely reminder. Forgive me for asking(instead of reading code),
but does it make sense to have the strip symbol option available
on lua_load().or luaL_loadfile().
I have (patched) code that currently has a sequnce like:

luaL_loadfile()
 luaU_dump() -- with stripping
luaL_loadfile()

It would be nice if it was just:

luaL_loadfile(L, filename,bStrip);

DB
Reply | Threaded
Open this post in threaded view
|

Re: luadump

Luiz Henrique de Figueiredo
> but does it make sense to have the strip symbol option available
> on lua_load().or luaL_loadfile().

It may make sense  but it'll complicate the loader because it'll have to
read and skip the debug info. Stripping at dump time is much easier.
--lhf