[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Embedding scripts in executable
- From: Tim Caswell <tim@...>
- Date: Tue, 4 Oct 2011 09:52:05 -0700
Thanks, but I've read and re-read the section in the docs from HEAD.
If you look at my makefile, I do have the -Wl,-E flag:
https://github.com/creationix/luvit/blob/857d7a03de65a95045a9de43be17b46462494304/Makefile#L38
I'll dig more into it today. Hopefully I can figure this out soon so
I can continue implementing new features.
On Tue, Oct 4, 2011 at 1:12 AM, Mike Pall <mikelu-1110@mike.de> wrote:
> Tim Caswell wrote:
>> I put printf statements in ll_loadfunc and it never seems to be
>> called.
>
> For symbols in the executable the lookup is performed in
> lj_cf_package_loader_preload.
>
>> I'm sure I'm missing something simple, but I can't figure it out.
>
> You need to export the symbols from the binary. On Windows this is
> done indirectly via their declaration. On Linux etc. you need to
> use -Wl,-E when linking the executable.
>
> [And yes, this is spelled out in
> doc/running.html#opt_b
> from git HEAD.]
>
> --Mike
>
>