lua-users home
lua-l archive

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

> I'm confused.  Why don't you just use the linker to put in the data
> that you want?  The most portable way to do this is just stuff
> everything into a const char[] and compile it.  If you want to skip
> the octets->.c->.o overhead I suppose you could use objcopy to go
> directly from octets->.o, or use a linker script for more control.
One problem with that is that your char[] array will seat in RAM even
after it has been compiled by Lua, which looks like a waste. Reading
from somewhere (a file, a chunk of data at the end of the executable or
a Windows resource, be them compressed or not) does not waste memory.

Andre de Leiradella