lua-users home
lua-l archive

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


On Sat, 27 Feb 2010 16:17:58 -0200
Fabio Mascarenhas <mascarenhas@acm.org> wrote:

> Lua modules compiled without PIC *will* work, with two caveats:
> increased memory consumption, because each Lua process may end up
> with its own copy of the module code, and the compiler may optimize
> intra-module access to the global symbols of the module and resolve
> them directly instead of through the global offset table, preventing
> the overriding of these global symbols by other shared objects.
> 
> I do not see either of these as a big deal for Lua modules.

I do.  I was attempting to use LuaRocks-generated modules in an
embedded system.  Memory consumption is important.  Also, this
indirectly effects the performance of the code, as multiple copies of
the same code may end up polluting the cache.

> Thankfully the point will be moot once we all migrate away from x86.

... and become unmoot for the poor souls using architecture with
similar problems to x86 with respect to -fPIC, or people who will be
stuck on x86.

There are no disadvantages.  Just always pass it, already.

B.