On Thu, Sep 1, 2016 at 10:40 PM, David Crawshaw <[email protected]> wrote:

> It sounds like you'll need to use external linking if you need
> runtime.tlsg to be TLS IE. Using c-shared is reasonable if you have
> some machinery to do the equivalent of dlopen and call the global
> initializer the runtime inserts into the c-shared library.
>
> Does OSv support the equivalent of dynamically loading a .so that uses
> TLS IE? If so, buildmode=c-shared is a good way to go.
>

Yes, exactly - OSv basically revolves around a dynamic linker which can
load ELF objects (shared object, PIE, etc.), link their references to glibc
to the implementation in the OSv kernel (and also allow resolving
references between different shared libraries, as usual) - and then run
the result. And TLS IE is supported.

So yes, buildmode=c-shared indeed sounds like the best build mode for us.
It seems that buildmode=c-shared hides *all* the functions from the dynamic
linker, though, so I guess we'll need to "export" at least the main()
function.

I wonder, by the way, why is exporting main() not the default?
How is c-shared usable without exporting anything?

Nadav.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to