Hello All,

A few questions and wishes about plugins (Go1.8 Linux/amd64)

Can a plugin be made of several source files in Go? How should then I 
compile a single plugin myfoo.so from several Go source files ? Can a  
plugin define several packages? 

Can a plugin contain several packages? How can I refer to symbols inside 
packages of plugins? As the usual "packagename.PublicSymbol" passed as 
argument to plugin.Lookup <https://golang.org/pkg/plugin/> ? If yes, that 
should IMHO be documented.

Can one get a plugin handle for the entire program & process (like dlopen(3) 
<http://man7.org/linux/man-pages/man3/dlopen.3.html> does with a NULL 
*filename* argument on Linux)  From my understanding of 
plugin/plugin_dlopen.go <https://golang.org/src/plugin/plugin_dlopen.go> 
this is not the case. I wish it would be the case.

Can the packages defined in one plugin be visible from plugins loaded 
afterwards? I'm thinking of a dlopen with  *RTLD_GLOBAL *flag in C parlance.

I'm interested in having my Go program (monimelt 
<https://github.com/bstarynk/monimelt/> on github, currently Feb2017 in 
pre-alpha stage, so nothing is working) generate at runtime some Go source 
files, compiling them as a plugin (by forking some compilation command at 
runtime), and loading them. BTW, I'm really interested in Go only since its 
plugin abilities.... so they matter a lot to me.

Is dladdr(3) <http://man7.org/linux/man-pages/man3/dladdr.3.html> available 
in Go? I would like, given a pointer, to get the name of the function at 
the same address (but I guess there could be issues with closures).

Is there any name mangling <https://en.wikipedia.org/wiki/Name_mangling> 
issues the user of Go plugins should be aware of?

Regards.


-- 
Basile Starynkevitch (France)       -       http://starynkevitch.net/Basile/ 



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" 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