--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
Ideally you shouldn't have to static link with libv8.a at all. I bet there are gcc/ld flags that would allow all to be .so.
I am sure you don't want to statically link libv8.a multiple times.
I think you need to statically link libv8.a with your main program and force all symbols to be exported. Then your loaded .so can find the symbols for libv8 in your main program.
Ideally you shouldn't have to static link with libv8.a at all. I bet there are gcc/ld flags that would allow all to be .so.
Okay, will try this: link v8cgi with libv8.a; link my modules with libv8.so. V8 symbols will be available at runtime so the modules will be happy; libv8.a will be linked just to main binary. Sounds reasonable; will let you know about the outcome.
Ideally you shouldn't have to static link with libv8.a at all. I bet there are gcc/ld flags that would allow all to be .so.
Yes, the shared solution works flawlessly. I am just trying an alternative, suggested by one of my users...
On Thu, Oct 6, 2011 at 5:18 PM, Ondřej Žára <ondre...@gmail.com> wrote:Okay, will try this: link v8cgi with libv8.a; link my modules with libv8.so. V8 symbols will be available at runtime so the modules will be happy; libv8.a will be linked just to main binary. Sounds reasonable; will let you know about the outcome.
i _think_ that runs the risk of the problem you and i discussed a few days ago - a "split brain" (as it's known in clustering jargon). Some of v8's file-local static (not exported) internals might be in the static bits and some might be allocated again in the DLL. Might. Maybe.
Ideally you shouldn't have to static link with libv8.a at all. I bet there are gcc/ld flags that would allow all to be .so.
Yes, the shared solution works flawlessly. I am just trying an alternative, suggested by one of my users...But of course i've been known to be wrong ;).
--
.so should be able to find the symbols. I think there's a special command line switch to gcc/ld that will export all the symbols in your main program (and libv8.so) to the elf file.
Try linking everything against libv8.so. Your main program should be able to load v8 as a .so, and all your other .so should be able to find the symbols. I think there's a special command line switch to gcc/ld that will export all the symbols in your main program (and libv8.so) to the elf file.