lua-users home
lua-l archive

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


On Fri, Apr 22, 2016 at 10:55:57AM +0200, Karel Tuma wrote:
> Excerpts from Xavier Wang's message of 2016-04-22 08:02:20 +0200:
> > I have made a Lua patch for this proposal[1].
> > 
> > 
> > to demonstrate it, just compile a normal lua53.dll, and build lua.c
> > with any other C modules (e.g. lpath.c[2]), and just:
> > 
> This will not work unless you link the binary with -Wl,--export-dynamic
> or the equivalent [1]. AFAIK POSIX does not support symbols introduced
> via program binary, only whatever is opened via dlopen() is guaranteed
> to populate runtime symbol table.

>From the POSIX specification for dlopen:

  If file is a null pointer, dlopen() shall return a global symbol table
  handle for the currently running process image. This symbol table handle
  shall provide access to the symbols from an ordered set of executable
  object files consisting of the original program image file, any executable
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  object files loaded at program start-up as specified by that process file
  (for example, shared libraries), and the set of executable object files
  loaded using dlopen() operations with the RTLD_GLOBAL flag.