[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Proposal] Load module symbols from main program
- From: Xavier Wang <weasley.wx@...>
- Date: Sat, 23 Apr 2016 17:12:56 +0800
2016-04-23 16:23 GMT+08:00 Karel Tuma <kat@lua.cz>:
> Excerpts from William Ahern's message of 2016-04-23 00:46:14 +0200:
>> object files consisting of the original program image file, any executable
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> In practice, most implementations return NULL and dlsym(NULL, ...) works
> to the same effect. The main issue is that linkers don't preserve global
> symbols of main executable unless specifically instructed to do so.
>
I don't know other systems. but you can just compile like Makefile in
lua itself. it's a single executable, and exported all dynamic
symbols.
I looked into lua's build system, and it use -Wl,-E in linux, and
directly build in Mac OS X, use the same flags will work.
--
regards,
Xavier Wang.