Skip to content

Latest commit

 

History

History

go-plugins-cgo-with-same-symbol-names

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

go-plugins-cgo-with-same-symbol-names

Example demonstrate using go plugins that statically linked C libraries with CGO with same symbol names with using -fvisibility=hidden GCC flag

golang/go#42854

Build

make

Clean

make clean

Output

./main
Load Go plugin hello1.so
Load Go plugin hello2.so

Call Go plugin hello1.go
Hello from Go plugin hello1.go
Call C hello1.c
Hello from C hello1.c

Call Go plugin hello2.go
Hello from Go plugin hello2.go
Call С hello2.c
Hello from C hello2.c