[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Renaming Lua modules (was Re: Modules with standalone main program)
- From: Sean Conner <sean@...>
- Date: Tue, 27 Feb 2018 11:37:28 -0500
It was thus said that the Great Soni They/Them L. once stated:
> On 2018-02-26 07:04 PM, Sean Conner wrote:
>
> > Now, Lua 5.3 *DOES* contain package.loadlib(), which is a wrapper
> >around dlopen()/dlsym(). So keeping in mind the limitations (there must
> >be a unique symbol identifying the entry point of a C module), if you can
> >come up with a way to rename a C-based Lua module and still find that
> >unique symbol *WITHOUT RECOMPILING THE MODULE*, then by all means, go
> >ahead. I'd love to see the solution.
>
> Since I can access the symbol table (by reading the module with io.open
> and looking at all of its symbols), I can probably write something that
> finds the common prefix for all luaopen_* and omits it when doing
> requires. This should solve the problem?
I suppose. You'll need the ELF specification for Linux and the Mach-O
specification for Mac OS-X. But in theory that should be possible.
-spc
- References:
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Sean Conner
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Soni "They/Them" L.
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Sean Conner
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Soni "They/Them" L.
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Sean Conner
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Soni "They/Them" L.
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Sean Conner
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Soni "They/Them" L.
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Sean Conner
- Re: Renaming Lua modules (was Re: Modules with standalone main program), Soni "They/Them" L.