[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building a statically linked copy of Lua
- From: Drake Wilson <drake@...>
- Date: Fri, 8 Apr 2011 05:42:07 -0700
Quoth Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>, on 2011-04-08 08:53:17 -0300:
> > - Would it still be possible to load shared libraries from such an
> > executable, or would I have to build everything into it?
>
> You need to link the interpreter using -Wl,-E (or equivalent magic)
> to export the Lua API symbols.
Er, as a secondary note, on many systems completely-static executables
can't access dlopen because it needs the dynamic loader to be present
in the first place. AFAIK -Wl,-E doesn't help there. If you don't
need it to be completely static, then you can build with minimal
shared lib dependencies and then dlopen will still work.
---> Drake Wilson